调试maven时候,报错
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ep-easyui-webapp: Could not resolve de
pendencies for project ep-easyui-webapp:ep-easyui-webapp:war:1.0-SNAPSHOT: The f
ollowing artifacts could not be resolved: javax.persistence:ejb:jar:3.0-public_r
eview, maven-plugins:maven-cobertura-plugin:plugin:1.3, maven-plugins:maven-find
bugs-plugin:plugin:1.3.1, persistence:persistence:jar:1: Failure to find javax.p
ersistence:ejb:jar:3.0-public_review in http://localhost:8081/nexus/content/grou
ps/EpPublic/ was cached in the local repository, resolution will not be reattemp
ted until the update interval of EpPublic has elapsed or updates are forced -> [
Help 1]
我在pom.xml 文件中添加
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>ejb</artifactId>
<version>3.0-public_review</version>
</dependency>
仍然抱这个错,解决方法
1) Manually install this artifact into your local repo cache
2) Add an excludes and a corresponding dependency so you get a proper artifact
3) Stop depending on outdated Hibernate artifacts, I'd suggest
upgrading to this one:
http://repo2.maven.org/maven2/org/hibernate/hibernate-annotations/3.4.0.GA/
改成<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
</dependency>
同时把
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>ejb</artifactId>
<version>3.0-public_review</version>
</dependency>
去掉