我的spring-project有问题。当我开始在我的pom.xml中添加dependnency时,我注意到我无法在版本4.0.3中添加类似spring-tx或spring-orm的依赖性.RELEASE,它的工作与我测试的所有其他版本 - 4.0.0.RELEASE - 4.0.5.RELEASE(当然没有0.3)。
我的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-
v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dinor913.example</groupId>
<artifactId>ExampleProjectHibernate</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>ExampleProjectHibernate Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<java-version>1.7</java-version>
<org.springframework-version>4.0.3.RELEASE</org.springframework-version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework-version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>org.test.int1.Main</mainClass>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
Eclipse给我错误
ArtifactDescriptorException: Failed to read artifact descriptor for
org.springframework:spring-tx:jar:4.0.3.RELEASE: ArtifactResolutionException: Failure to
transfer org.springframework:spring-tx:pom:4.0.3.RELEASE 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-tx:pom:4.0.3.RELEASE
from/to central (http://repo.maven.apache.org/maven2): null to
http://repo.maven.apache.org/maven2/org/springframework/spring-tx/4.0.3.RELEASE/spring-tx-
4.0.3.RELEASE.pom
我检查了网址 http://repo.maven.apache.org/maven2/org/springframework/spring-tx/4.0.3.RELEASE/spring-tx-4.0.3.RELEASE.pom我看到xml那么为什么我得到错误null(&lt; - this url)?
我只是好奇为什么我在我的项目中使用spring 4.0.3.RELEASE得到这个错误我改变了工作版本