我正在使用web应用程序,为了最大限度地减少依赖项的数量pom.xml,我创建了一个包含所有所需依赖项的jar。2在使用maven包含jar时缺少依赖项
但在我的web项目中添加此jar依赖项时,似乎jar中的2个现有依赖项未包含在我的web-app中。
的pom.xml我的web应用程序的:
<!-- rest-easy-api -->
<dependency>
<groupId>rest-easy-api</groupId>
<artifactId>rest-easy-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
的2个失踪依赖关系(包括在我的罐子):
<!-- EclipseLink's JPA capabilities for relational databases. -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.2</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.eclipse.persistence</groupId>
<artifactId>commonj.sdo</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- JPA 2.1 -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.1.0</version>
<scope>provided</scope>
</dependency>
这就像本地资源库中不更新..我没有清理这两个项目,删除它们 - 重新导入它们。它仍然不起作用..
你们有什么想法可能是这个原因吗?
感谢,
谢谢,它的工作原理..我想我应该阅读有关范围标记:) – Copernic 2014-12-07 23:43:00