2

我无法使用 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"
4

2 回答 2

1

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

于 2016-01-22T11:28:30.257 回答
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 所说。

于 2016-01-22T11:44:46.280 回答