1. 程式人生 > >could not find goal 'create' in plugin的問題解決

could not find goal 'create' in plugin的問題解決

今天嘗試使用了Maven,參考了http://www.cnblogs.com/fnng/archive/2011/12/02/2272610.html這個地址的教程。

在進行到建立專案的時候,輸入了提供的命令mvn archetype:create -DgroupId=com.chongshi.test -DartifactId=hello -DpackageName=com.chongshi.test -Dversion=1.0

然後建立報了錯誤,錯誤提示是

[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-roject, generate, help, integration-test, jar, update-local-catalog -> [Help 1]

找了百度了關鍵字“ Could not find goal 'create' in plugin ”並沒有相關的解答- -

花了時間找了很多地方,最終發現了答案:https://www.oschina.net/question/2665568_2157300

問題的關鍵是!!!create改成generate,3.0.5之後create已廢棄!!!

宛如日了狗了,發現自己看的是11年的教程,的確。。。時間跨度有點大了!!!

於是只要將命令改成

mvn archetype:generate -DgroupId=com.chongshi.test -DartifactId=hello -DpackageName=com.chongshi.test -Dversion=1.0


就完全OK了= =浪費了這麼長時間結果卻是這樣子。。。。希望同樣錯誤的人能及時通過這個文章找到答案吧