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