您的位置:首页 > 其它

mvn archetype:create 报错

2016-05-05 10:11 113 查看
刚下载配置完maven,在命令行新建项目时报错:
建项目的命令为:mvn archetype:create -DgroupId=org.sonatype.mavenbook.ch03 -DartifactId=simple -DpackageName=org.sonatype.mavenbook
报错信息为:
[INFO] Scanning for projects...
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --- maven-archetype-plugin:2.3:create (default-cli) @ standalone-pom ---
[INFO] BUILD FAILURE
[INFO] Total time: 2.728 s
[INFO] Finished at: 2015-04-14T13:36:35+08:00
[INFO] Final Memory: 14M/108M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.3:create (default-cli) on project standalone-pom: Unable to parse configuration
of mojo org.apache.maven.plugins:maven-archetype-plugin:2.3:create for paramete
r #: Cannot create instance of interface org.apache.maven.artifact.repository.Ar
tifactRepository -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:

修改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生成项目
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: