No plugin found for prefix 'denpendecy' in the current project and in the plugin

今天在使用mvn denpendecy:tree查看maven依賴樹的時候失敗了,錯誤日誌如下:

[ERROR] No plugin found for prefix 'denpendecy' in the current project and in the plugin groups [org.sonarsource.scanner.maven, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\wuxiaoyuan\.m2\repository), central (ht
tp://mvn.pajk-ent.com/nexus/content/groups/public)] -> [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/NoPluginFoundForPrefixException

根據日誌提示的幫助文檔:http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
This can happen when invoking a plugin from the command line by giving only its prefix instead of its group and artifact id, e.g. in mvn help:effective-pom the token help is the plugin prefix and can serve as an abbreviation of org.apache.maven.plugins:maven-help-plugin.
中文含義:當僅通過插件前綴而不是groupIdartifactId從命令行調用插件時,可能會發生這種情況。
例如,mvn help:effective-pom可以作爲mvn org.apache.maven.plugins:maven-help-plugin的縮寫。

鑑於僅使用前綴的情況下會發生這種錯誤,那麼便採用全命令臨時解決了依賴樹的查看問題:
mvn org.apache.maven.plugins:maven-dependency-plugin:tree
事後對比mvn denpendecy:tree發現dependency拼寫錯誤

正確的命令:mvn dependency:tree

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章