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

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