1. 程式人生 > >Maven報錯

Maven報錯

變量 all 通過 ips 0.10 中文 技術 groups target

今天把項目down下來,項目,報錯maven clean ,install 沒解決,然後jdk版本也對,maven,M2-HOME安裝沒有問題.

問題標誌為maven install 下的jar包不完全

項目運行報錯:

Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy-dependencies (copy-dependencies) on project operationPlat-if: Execution copy-dependencies of goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy-dependencies failed: Unable to load the mojo ‘copy-dependencies‘ in the plugin ‘org.apache.maven.plugins:maven-dependency-plugin:2.8‘. A required class is missing: org/codehaus/plexus/archiver/ArchiverException

重新配置maven settings.xml發現報錯

Unable to update index for nexus|http://10.10.66.33:8082/nexus/content/groups/public-snapshots/

通過報錯信息找到pom.xml文件裏面

技術分享

刪掉以後,maven install不再報錯.

但是,在web項目中又會報錯.

於是乎,問了下同事,

解決方法,重新安裝,

安裝路徑不能有空格,不能有中文.

總結一下 :

1. 確保正確安裝maven。(安裝路徑不能有空格,不能有中文)

2. 確保相關的環境變量存在(M2_HOME、 MAVEN_HOME,JAVA_HOME等)。

3. 確保settings.xml中的庫目錄指向正確的地址,下載地址也得保證正確.

技術分享

4. 如果還是不行就完全刪掉maven,從第一條開始做起.

參考資料:

1.myeclipse配置maven環境http://www.cnblogs.com/xusir/archive/2013/12/22/3486520.html

Maven報錯