intellij idea使用maven本地仓库及修改本地仓库路径

手动创建一个settings.xml 的文件,把下面的代码复制进去即可,标红色的为仓库路径,可以自行更改。

<?xml version="1.0" encoding="UTF-8"?>


<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>D:/maven/my_local_repository</localRepository>
  

</settings>

简单配置一下就可以,太多反而可能造成依赖包不能正确加载!

手动创建一个settings.xml 的文件,把下面的代码复制进去即可,标红色的为仓库路径,可以自行更改。

<?xml version="1.0" encoding="UTF-8"?>


<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>D:/maven/my_local_repository</localRepository>
  

</settings>

简单配置一下就可以,太多反而可能造成依赖包不能正确加载!

猜你喜欢

转载自www.cnblogs.com/dekevin/p/12313718.html