日期:2014-05-17  浏览次数:20736 次

maven构建项目失败
一个spring项目本来是好的
就是加了两个依赖包
<dependency>
  <groupId>opensymphony</groupId>
  <artifactId>oscache</artifactId>
  <version>2.4.1</version>
</dependency>
  <dependency>
  <groupId>org.springmodules</groupId>
  <artifactId>spring-modules-cache</artifactId>
  <version>0.8</version>
</dependency>
之后,使用mvn eclipse:clean eclipse:eclipse构建项目报出如下错误
[ERROR] Failed to execute goal on project client: Could not resolve dependencies for project com.hgcx:client:war:0.1.0.B
UILD-SNAPSHOT: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, gigaspaces:gigaspaces-ce:jar:5.1-16
03-000, jini:jsk-lib:jar:2.1, jini:jsk-platform:jar:2.1, jini:mahalo:jar:2.1, jini:reggie:jar:2.1, jini:start:jar:2.1, j
ini:boot:jar:20060125, jini:webster:jar:20060125, jboss:jboss-common:jar:4.0.3, jboss:jboss-jmx:jar:4.0.3, jboss:jboss-m
inimal:jar:4.0.3, jboss:jboss-system:jar:4.0.3, jcs:jcs:jar:1.2.6.5, xpp3:xpp3_min:jar:1.1.3.4.I: Failure to find javax.
jms:jms:jar:1.1 in http://maven.springframework.org/release was cached in the local repository, resolution will not be r
eattempted until the update interval of spring-maven-release has elapsed or updates are forced -> [Help 1]

------解决方案--------------------
根据错误提示,就是关联的一些jar文件无法倒入,把它提示的那些jar添上(或者有的话就检查下pom文件)。自己细心看看应该能明白的。