maven使用命令创建项目失败[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archety

原文出处:http://www.cnblogs.com/zjfjava/p/6819459.html

我使用的maven版本是3.5,版本信息如下图:
maven使用命令创建项目失败[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archety

今天学习使用maven命令创建Java web项目遇到如下问题:
maven使用命令创建项目失败[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archety

创建命令: mvn archetype:create -DgroupId=org.seckill -DartifactId=seckill -DarchetypeArtifactId=maven-archetype-webapp

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

原因:版本命令冲突,即在maven3.0.5以上版本舍弃了create,使用generate生成项目
maven使用命令创建项目失败[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archety

解决办法: 将create改为generate
mvn archetype:generate -DgroupId=org.seckill -DartifactId=seckill -DarchetypeArtifactId=maven-archetype-webapp

参考maven官方文档:http://maven.apache.org/guides/getting-started/index.html
maven使用命令创建项目失败[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archety

注:随便转