詳細報錯:java
Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from http://10.74.156.84:8085/nexus/content/groups/public/ was cached in the
local repository, resolution will not be reattempted until the update interval of U32_PUBLIC has elapsed or updates are forced. Original error: Could not
transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to U32_PUBLIC (http://10.74.156.84:8085/nexus/content/groups/public/):
connect timed outapache
錯誤信息出如今pom頭的project標籤,project標籤內容是maven
<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">命令行
緣由code
這是因爲缺乏maven-resources-plugin-2.6.jar文件。這個文件是在{user.home}\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\下。{user.home}是maven的配置路徑,通常是個人文檔,是window-preferences-MyEclipse-Maven4MyEclipse-User Setting裏面的Local Repository。xml
解決方案blog
一、在pom.xml文件中加入maven-resources-plugin配置ip
<dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> </dependency>
二、在命令行下運行mvn install
,若是執行正確應該會在{user.home}\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\下看到maven-resources-plugin-2.6.jar文件文檔
三、刷新工程(右鍵工程選擇刷新項)it
四、刷新maven配置,右鍵工程節點,選擇Maven4MyEclipse-Update Project Configuration