mvn 3.5版本之前宗兼,創(chuàng)建web項目的命令是:mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp?-DinteractiveMode=false
今天按照了mvn3.5造锅,進行創(chuàng)建項目贯莺,提示如下錯誤:
[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
查詢了文檔才發(fā)現(xiàn),原來mvn3.5之后竞慢,創(chuàng)建項目的 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