在过去的几天里,我一直坚持这个问题无济于事。我的pom.xml中描述了几个依赖项。但Eclipse尖叫着我说错误"无法解决项目的依赖关系"
我有以下详细信息。
的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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edi</groupId>
<artifactId>edi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>struts-menu</groupId>
<artifactId>struts-menu</artifactId>
<version>2.4.3</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>WEB-INF/src</sourceDirectory>
<resources>
<resource>
<directory>WEB-INF/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<webXml>WEB-INF/web.xml</webXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<packaging>war</packaging>
</project>
Maven日志:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------------------------------------------------------- --
[INFO] Building edi 0.0.1-SNAPSHOT
[INFO] ---------------------------------------------------------------------- --
Downloading: http://repo1.maven.org/maven2/com/oracle/ojdbc6/11.2.0/ojdbc6- 11.2.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------- --
[INFO] Total time: 22.486s
[INFO] Finished at: Tue Jun 30 10:41:56 EDT 2015
[INFO] Final Memory: 3M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project edi: Could not resolve dependencies for project edi:edi:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [com.oracle:ojdbc6:jar:11.2.0 (compile), commons-lang:commons-lang:jar:2.6 (compile), commons-logging:commons-logging:jar:1.2 (compile), struts-menu:struts- menu:jar:2.4.3 (compile)]: Failed to read artifact descriptor for com.oracle:ojdbc6:jar:11.2.0: Could not transfer artifact com.oracle:ojdbc6:pom:11.2.0 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect -> [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
对此有任何帮助将不胜感激。感谢。