java - 使用maven下载javax.json

标签 java json maven

我正在尝试使用 javax.json lib,因此我将其添加到我的 pom.xml 文件中,如下所示:

<dependency>
    <groupId>javax.json</groupId>
    <artifactId>javax.json-api</artifactId>
    <version>1.0</version>
</dependency>

这个在标签内。但是,当我尝试运行我的项目时,执行 run as 然后将目标设置为“package”或“install”,我希望在 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] ------------------------------------------------------------------------

最佳答案

在 Eclipse 中,您必须右键单击该项目并选择“Maven...更新项目”,pom.xml 文件中新添加的库将下载到您的库目录中。

关于java - 使用maven下载javax.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36877870/

相关文章:

java - Eclipse Maven Spring : Server Error when I try to Run As Server (Tomcat 7)

jsp - 如何使用 Maven war 插件在 war 之间重用 war 资源

java - Java Maven 项目的 Marginalia/Docco/etc?

java - Java中LinkedList的更新性能

json - '无法从 Node js 中的 JSON 对象获取值

java - spring mvc ajax数据用Jackson截断

java - 如果 WireMock 查询不匹配,则默认为重叠端点而不是 404

java - junit4 中未找到测试

Java库计算两个字符串之间的相对差异?

java - 当父级在不同的包中时模拟 protected 父级方法