1. 程式人生 > >maven錯誤解決辦法

maven錯誤解決辦法

建立maven時不能使用archetype正常建立專案並報如下錯誤的解決辦法

"C:\Program Files\Java\jdk1.7.0_79\bin\java" -DarchetypeCatalog=internal "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.1\plugins\maven\lib\maven3\bin\m2.conf" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar" org.codehaus.classworlds.Launcher -Didea.version=2016.1.1 -s D:\develop_software\apache-maven-3.3.9\conf\settings.xml -DinteractiveMode=false -DgroupId=Mv -DartifactId=com.maobo.mv -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=internal org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom <<<
[INFO] 
[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype repository not defined. Using the one from [org.apache.maven.archetypes:maven-archetype-webapp:1.0] found in catalog internal
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.349s
[INFO] Finished at: Sun Oct 16 22:20:05 CST 2016
[INFO] Final Memory: 10M/120M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-webapp:internal) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] Maven execution terminated abnormally (exit code 1)

--------------------- 
作者:波子汽水yeah 
來源:CSDN 
原文:https://blog.csdn.net/maobois/article/details/52833578 
版權宣告:本文為博主原創文章,轉載請附上博文連結!

將/maven_repositoryorg/apache/maven本地倉庫下這個檔案內下載的檔案刪除,重新去用idea建立,會再次下載,即可成功建立.
原文:https://blog.csdn.net/maobois/article/details/52833578