Maven 命令行創建項目時 Could not find goal ‘create’ in plugin org.apache.maven.plugins:...


使用maven3.3.9 版本,進行命令行創建項目時輸入以下命令創建失敗

mvn archetype:create -DgroupId=com.zang.maven  -DartifactId=system-parent -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false 

主要報錯信息Could not find goal ‘create’ in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.0 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [Help 1]

原因:版本命令沖突,即在maven3.0.5以上版本舍棄了create,使用generate生成項目

解決辦法:將create改為generate

mvn archetype:generate -DgroupId=com.zang.maven -DartifactId=system-parent -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false 

 

官方文檔地址

https://maven.apache.org/guides/getting-started/index.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM