[英]Spring artifactDescriptorException
嗨,我是Spring的新手,在修改自動生成的spring mvc項目的STS上,我在標記視圖上收到此錯誤:
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.springframework:spring-context:jar:${spring.version}: ArtifactResolutionException: Failure to transfer org.springframework:spring-context:pom:${spring.version} from 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. Original error: Could not transfer artifact org.springframework:spring-context:pom:${spring.version} from/to central (http://repo.maven.apache.org/maven2): Illegal character in path at index 72: http://repo.maven.apache.org/maven2/org/springframework/spring-context/${spring.version}/spring-context-${spring.version}.pom pom.xml /MMASGIS7 line 1 Maven Dependency Problem
您可以在http://pastebin.com/DkKzG2DR上看到我的pom.xml,可以在正確的方向上解決該問題嗎?
Maven運行時無法解析依賴關系,因為由於缺少該屬性,因此它無法解析您指定的版本。 將此屬性添加到pom.xml文件或完全刪除spring.version
並使用您已經在pom中定義的org.springframework-version
。
<spring.version>3.1.1.RELEASE</spring.version>
我建議只使用其中之一來保持一致性和傳遞依賴。
您出於同一目的使用兩個屬性: org.springframework-version
和spring.version
。 僅使用其中之一,其余pom部分中使用相同的名稱。
<properties>
<java-version>1.6</java-version>
<org.springframework-version>3.1.1.RELEASE</org.springframework-version>
or
<spring.version>3.0.5.RELEASE</spring.version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>
</properties>
Since you have alreay defined `org.springframework-version` , You can replace ${spring.version} by ${org.springframework-version}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.