Maven3.5.0以后创建项目命令变了

mvn 3.5版本之前,创建web项目的命令是:mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

今天按照了mvn3.5,进行创建项目,提示如下错误:

[ERROR] 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]

[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/MojoNotFoundException

查询了文档才发现,原来mvn3.5之后,创建项目的 archetype:create 变成了:archetype:generate  了。



例如:

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=tv.daoran.crawl.cctv -DarchetypeArtifactId=maven-archetype-webapp -DartifactId=crawlCCTV -DinteractiveMode=false

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容