学习maven遇到的问题

1、使用命令"mvn help:system"下载maven本地仓库时遇到:nopluginfoundforprefixexception

[ERROR] No plugin found for prefix ‘help’ in the current project and in the plugin groups [org.apache.maven.plugins, org.code
haus.mojo] available from the repositories [local (C:\Users\Administrator.m2\repository), central (https://repo.maven.apache
.org/maven2)] -> [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

解决方法:
	找到maven conf 目录下的setting.xml文件,修改其中的mirror 为
   <mirror>  
       <id>nexus-aliyun</id>  
       <mirrorOf>*</mirrorOf>  
       <name>Nexus aliyun</name>  
       <url>http://maven.aliyun.com/nexus/content/groups/public</url>  
   </mirror>

2、使用eclipse新建maven项目时出错:org.apache.maven.archiver.MavenArchiver.getManifest

解决办法:
1、点击help->install new software
2、点击add在这里插入图片描述
3、在弹出的窗口中Location中输入地址:https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/ 点击ok
在这里插入图片描述
4、最后一步,图片中圈起来的地方√去掉,这样下载速度较快,然后安装就行了,重启后update一下项目问题解决在这里插入图片描述

3、maven代理设置

找到setting.xml文件,修改里面的代理地址和端口

<proxy>
   <id>my-proxy</id>
   <active>true</active>
   <protocol>http</protocol>
   <username>用户名(可不用)</username>
   <password>密码(可不用)</password>
   <host>这里是需要设置的代理地址</host>
   <port>这里是设置的代理端口</port>
</proxy>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值