Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.0 among

本文解决在使用Maven 3.3.9版本时,通过mvn archetype:create命令创建项目遇到的错误,并提供正确的命令格式及解释。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在使用maven建立工程;mvn archetype:create -DgroupId=org.ldy -DartifactId=proj
本地maven版本为:Apache Maven 3.3.9
遇到: 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]的问题

初步分析是因为maven版本原因导致的
在stackoverflow找到解决方式如下

mvn archetype:generate -DgroupId=org.sonatype.mavenbook.ch03 -DartifactId=simple -DpackageName=org.sonatype.mavenbook -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
修改create命令为generate

参考网址为http://stackoverflow.com/questions/29147329/unable-to-create-a-new-maven-hello-world-project

原因分析:create is deprecated in maven 3.0.5 and beyond,在maven3.0.5以上版本舍弃了create,使用generate生成项目

C:\Users\VICTUS\.jdks\ms-17.0.15\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\VICTUS\AppData\Local\Temp\archetypetmp -Djansi.passthrough=true -Dmaven.home=F:\maven\maven3.6\maven3.6 -Dclassworlds.conf=F:\maven\maven3.6\maven3.6\bin\m2.conf -Dmaven.ext.class.path=D:\文件\ideaIU-2023.3.6.win\plugins\maven\lib\maven-event-listener.jar -javaagent:D:\文件\ideaIU-2023.3.6.win\lib\idea_rt.jar=7504:D:\文件\ideaIU-2023.3.6.win\bin -Dfile.encoding=UTF-8 -classpath F:\maven\maven3.6\maven3.6\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2023.3.6 -s F:\maven\maven3.6\maven3.6\conf\settings.xml -DinteractiveMode=false -DgroupId=com.itheima -DartifactId=CY_HiveDemo -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.1 org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate [INFO] Scanning for projects... [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.098 s [INFO] Finished at: 2025-07-09T15:04:04+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.4.0:generate (default-cli) on project standalone-pom: The plugin org.apache.maven.plugins:maven-archetype-plugin:3.4.0 requires Maven version 3.6.3 -> [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/PluginIncompatibleException Process finished with exit code 1
最新发布
07-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值