Hi I am a newbie to Spring, on STS modifing the autogenerated spring mvc project, I get this error on the markers view:

    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

you can see my pom.xml at http://pastebin.com/DkKzG2DR can you address me on the right direction to solve it?

有帮助吗?

解决方案

The maven runtime isnt able to resolve the dependency because, it isnt able to resolve the version that you have specified since the property is missing. Add this property to the pom.xml file or remove the spring.version completely and use the org.springframework-version that you already have defined in your pom.

<spring.version>3.1.1.RELEASE</spring.version>

I would suggest use just one of them for consistency and transitive dependencies.

其他提示

You are using two properties for same purpose: i.e. org.springframework-version and spring.version . Use only one of them, refer the same in rest of the pom part.

              <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归因
不隶属于 StackOverflow
scroll top