nics 发表于 2017-12-24 12:12:08

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 ->
  原因:版本命令冲突,即在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
页: [1]
查看完整版本: Maven 命令行创建项目时 Could not find goal ‘create’ in plugin org.apache.maven.plugins:.