问题描述
在安装maven成功后,cmd中输入mvn help:system命令,出现类似下面的错误信息
[ERROR] No plugin found for prefix ‘help’ in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Repositories\Maven), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[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] 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
第一次尝试:maven中央库设置
maven的安装目录下,进入conf文件夹,打开settings.xml,找到150行附近,修改
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
第二次尝试:修改文件所在位置
配置maven中央库之后,help:system命令依然无法成功执行。log中有红字提示有文件无法打开。结合之前对settings.xml文件修改时需要提供管理员权限,尝试把maven的安装文件从C盘移到D盘(同时记得修改环境变量的对应路径),终于成功。