【maven】cmd中 mvn help:system 报错解决

问题描述

在安装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盘(同时记得修改环境变量的对应路径),终于成功。

在这里插入图片描述

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值