當我嘗試構建項目時。構建失敗並顯示以下消息。無法計算構建計劃 - Eclipse Maven
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
我看到兩個類似的問題,並嘗試在答案中提到的一切。
我試過的東西。
settings.xml的變化,其中包括〜.m2/repository/settings.xml中的代理 - 無法在工作中從eclipse下載任何東西。從IE> Internet選項>連接>局域網設置獲取代理設置。當我使用命令提示符檢查它是否正確時,telnet [host] [port]什麼都沒有收到。
清理Cache,m2存儲庫並更新maven項目無法更新它。
試圖手動下載Maven插件並試圖將其放入.m2> repository> apache> maven> plugins> [各自的插件文件夾]嘗試再次重建相同的錯誤。
基本上所有東西在工作場所都被阻塞了。
settings.xml文件內容是: -
<settings>
<proxies>
<proxy>
<id>proxy</id>
<active>true</active>
<protocol>HTTP</protocol>
<host>proxy.asdf.com</host>
<port>6050</port>
</proxy>
</proxies>
</settings>
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.asdfasdf.asdfsd</groupId>
<artifactId>Service</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Service Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<springframework.version>4.2.0.RELEASE</springframework.version>
<jackson.version>2.5.3</jackson.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>4.2.0/version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>Service</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</build>
</project>
請幫忙。
爲什麼maven-clean-plugin提到兩次? –
對不起。粘貼了兩次。 –
我堅信,問題出在您的代理上。您的Maven無法連接到互聯網。 –