[英]maven clean install - Failed to execute goal on project myGoogleAppEngine
我創建了一個 Maven 項目。 之前,在我的 pom.xml 中,我使用的是 spring 版本 2.5.6,現在,我將 spring 的版本號更改為使用 3.1.0.RELEASE。
要更新不同的依賴項並更新我的 WEB-INF/lib 中的不同 jar,我使用了以下命令行:'mvn clean install' 並且出現以下錯誤
[WARNING] The POM for org.springframework:spring:jar:3.1.0.RELEASE is missing, no dependency information available
[INFO] BUILD FAILURE
[INFO] Total time: 0.847s
[INFO] Finished at: Sat Dec 07 13:49:20 CET 2013
[INFO] Final Memory: 4M/15M
[ERROR] Failed to execute goal on project myGoogleAppEngine: Could not resolve dependencies for project com.application:myGoogleAppEngine:war:0.0.1-SNAPSHOT: Failure to find org.springframework:spring:jar:3.1.0.RELEASE in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
你有什么解決辦法嗎?
謝謝
我的 pom.xml 的一部分
<properties>
<appengine.app.version>1</appengine.app.version>
<appengine.target.version>1.8.0</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.springframework.version>3.1.0.RELEASE</org.springframework.version>
</properties>
<dependencies>
<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<!-- Spring MVC framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
</dependencies>
我的 WEB-INF/lib
-spring-2.5.6.jar
-spring-aop-3.1.0.RELEASE.jar
-spring-asm-3.1.0.RELEASE.jar
-spring-beans-2.5.6.jar
-spring-beans-3.1.0.RELEASE.jar
-spring-context-2.5.6.jar
-spring-context-3.1.0.RELEASE.jar
-spring-context-support-2.5.6.jar
-spring-context-support-3.1.0.RELEASE.jar
-spring-core-2.5.6.jar
-spring-core-3.1.0.RELEASE.jar
-spring-expression-3.1.0.RELEASE.jar
-spring-web-2.5.6.jar
-spring-web-3.1.0.RELEASE.jar
-spring-webmvc-2.5.6.jar
-spring-webmvc-3.1.0.RELEASE.jar
-...
如果您要升級 Spring 版本,請將其升級到最新的 v3: 3.2.5.RELEASE
,如 Maven mvn 存儲庫中所述: http : 3.2.5.RELEASE
但是,您的問題在這里:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${org.springframework.version}</version>
</dependency>
沒有 artifactId 'spring' 它應該是spring-core
。
沒有名為org.springframework:spring:3.1.0.RELEASE
依賴org.springframework:spring:3.1.0.RELEASE
。 此 groupId/artifactId 組合可用的最后一個 jar 適用於版本2.5.6.SEC03
。
您必須更改此依賴項並將其重命名為spring-core
而不是spring
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.