解决更改Maven本地仓库地址springboot项目报错,永久设置Maven本地仓库地址的方法

想修改所有新建项目Maven的地址,在创建工程面板修改,搜索Maven,改三个地方:

打开之前创建的Maven项目,因为本地仓库地址改成D盘后,springboot的preject位置报红;

检查后,发现是setting.xml文件的<LocalRepositiory>位置错误,修改后还是报红;

于是搜索了一下,发现是阿里云的镜像地址更新了,于是更改过后重新进入项目问题就解决了。

<!-- 新的镜像地址 -->
<mirror>
		<!-- mirror -->
		<id>nexus-aliyun</id>
		<!-- -->
		<mirrorOf>central</mirrorOf>
		<!-- -->
		<name>Nexus aliyun</name>
		<!-- URL  -->
		<url>https://maven.aliyun.com/repository/public</url>
	</mirror>

<!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
<!-- 下面是自己修改后本地仓库的位置-->
  <localRepository>D:\code\spring\repository</localRepository>
  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值