我无法使用apache-maven3.2.2构建项目

时间:2016-01-22 09:46:50

标签: java apache maven wagon

我无法使用Apache-maven 3.2.2构建项目,因为我是maven的新手,我无法找到问题。请提供一些解决方案来解决它。

错误如下:

[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]     Unresolveable build extension: Plugin 
  org.apache.maven.wagon:wagon-ftp:1.0-beta-2 or one of its dependencies could 
  not be resolved: Failed to read artifact descriptor for 
  org.apache.maven.wagon:wagon-ftp:jar:1.0-beta-2: Could not transfer artifact
  org.apache.maven.wagon:wagon-ftp:pom:1.0-beta-2 from/to central 
  (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host 
  repo.maven.apache.org -> [Help 2]

和我的maven版本如下:

C:\Users\xyz>mvn -version
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T19:21:42+05:30)
Maven home: D:\software\Maven\apache-maven-3.2.2-bin\apache-maven-3.2.2
Java version: 1.7.0_01, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.7.0_01\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows nt (unknown)", version: "6.2", arch: "x86", family: "windows"

2 个答案:

答案 0 :(得分:1)

问题在于您的maven路径,您必须将bin作为您的maven路径

答案 1 :(得分:0)

在你的pom.xml中,尝试找到这个依赖项。

<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-2</version>
</dependency>

您可以使用以下工件更改它;

<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>2.10</version>
</dependency>

如果它不起作用,问题在于您的互联网设置,正如Tunaki所说。