我正在尝试使用javax.json lib,所以我将它添加到我的pom.xml文件中:
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.0</version>
</dependency>
这个标签里面。但是当我尝试运行我的项目运行然后将目标设置为“打包”或“安装”时,我期望看到我的Maven依赖项库中的json库像Junit这样的其他库。但我没有看到任何东西。因此,如果您对问题的来源有所了解,请告诉我。
PS:我是maven的新手。编辑:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building RssApp Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ RssApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ RssApp ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ RssApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\trist_000\Eclipse\RssApp\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ RssApp ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ RssApp ---
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ RssApp ---
[INFO] Packaging webapp
[INFO] Assembling webapp [RssApp] in [C:\Users\trist_000\Eclipse\RssApp\target\RssApp]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\trist_000\Eclipse\RssApp\src\main\webapp]
[INFO] Webapp assembled in [75 msecs]
[INFO] Building war: C:\Users\trist_000\Eclipse\RssApp\target\RssApp.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.751 s
[INFO] Finished at: 2016-04-27T01:53:10+02:00
[INFO] Final Memory: 10M/119M
[INFO] ------------------------------------------------------------------------
答案 0 :(得分:0)
在Eclipse中,您必须右键单击该项目并选择“Maven .... Update Project”,并将pom.xml文件中新添加的库下载到您的libraries目录中。