原文链接:

POM文件配置Maven仓库地址 - JavaShuo

maven使用setting.xml配置文件配置仓库地址 - JavaShuo

在pom.xml文件中设置Maven本地存储库位置?

POM文件配置Maven仓库地址

<repositories><repository><id>alimaven</id><name>aliyun maven</name><url>https://maven.aliyun.com/nexus/content/repositories/central/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></repository>
</repositories>
<pluginRepositories><pluginRepository><id>alimaven</id><name>aliyun maven</name><url>https://maven.aliyun.com/nexus/content/repositories/central/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository>
</pluginRepositories>

maven使用setting.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 repository/my_local_repository</localRepository><pluginGroups></pluginGroups><proxies></proxies><mirrors><!-- 镜像库 --><mirror><id>alimaven</id><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url><mirrorOf>central</mirrorOf>        </mirror></mirrors><profiles><profile><id>nexus</id><repositories>     <repository><id>aliyun-repo</id><url>http://maven.aliyun.com/nexus/content/groups/public/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository><repository><id>repo1</id><url>https://repo1.maven.org/maven2/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories><!-- 注意:如下配置用于指定Maven插件的仓库,不能省略,不然可能出现没法加载Maven插件的问题 --><pluginRepositories><pluginRepository><id>aliyun-plugin</id><url>http://maven.aliyun.com/nexus/content/groups/public/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository><pluginRepository><id>repo1-plugin</id><url>https://repo1.maven.org/maven2/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository></pluginRepositories></profile></profiles><activeProfiles><activeProfile>nexus</activeProfile></activeProfiles>
</settings>

--------------------------------------------------------------------------------------------------------------------

Maven的默认本地仓库在:${user.home}/.m2/repository;

如果需要自定义仓库路径,可以找到maven文件夹下的conf下的setting.xml文件进行修改,

以下自定义仓库路径为E:javaMavenapache-maven-3.3.9conf epository(repository为存放jar包的文件夹)

一般C:UsersAdmin.m2 epository文件夹下都是你maven项目用插件install之后打好的jar包,它既在你的项目的target下,又在你的这个本地仓库中。

POM文件配置Maven仓库地址相关推荐

  1. 开发技术-setting文件与pom文件配置maven私服

    1.需求: 今天公司替换私服地址,原有的地址弃用了,重新搞了下私服.记录一下. 2.实现: 1)setting文件中mirrors节点里配置镜像 <mirror><id>nex ...

  2. pom中配置maven仓库(阿里仓库)

    文章目录 pom中配置maven仓库 pom中配置maven仓库 配置maven仓库,可以在maven的settings.xml里改.优点是全局统一配置,缺点是不受你项目git管理. 也可以直接在po ...

  3. ecplise中maven仓库地址配置

    进入ecplise的maven配置界面Window>Preferences>Maven>User Settings 由于eclipse自带的maven是没有settings文件的,所 ...

  4. 国内maven仓库地址资源汇总

    国内maven仓库地址资源汇总 国内maven仓库地址:阿里云maven仓库,网易163maven仓库,以及其他maven仓库地址. 国内下载maven一般速度都很慢,下载需要很久时间.这里汇总了一些 ...

  5. Gradle修改缓存路径 和 Gradle修改Maven仓库地址

    Gradle修改缓存路径 修改gradle启动脚本进入gradle安装的bin目录,使用文本编辑器打开gradle.bat文件,在如图的位置添加以下语句 set GRADLE_OPTS="- ...

  6. (转)通过maven,给没有pom文件的jar包生成pom文件,maven项目引入本地jar包

    文章完全转载自 : https://blog.csdn.net/qq_31289187/article/details/81117478 问题一: 经常遇到公司私服或者中央仓库没有的jar包,然后通过 ...

  7. 将Maven仓库地址修改为阿里云的仓库地址

    <mirror><id>nexus-aliyun</id><mirrorOf>*</mirrorOf><name>Nexus a ...

  8. Windows 配置Maven仓库

    Windows 配置Maven仓库 自从写毕业论文以来就没有再碰过Springboot了,想着复习一下Springboot,创建项目之后想起来重装了系统,在Idea装完之后还没有配置Maven仓库,虽 ...

  9. win10如何配置maven仓库

    在使用eclipse开发java项目之前,我们还需要将本地的maven仓库配置好,以便于我们平时通过pom.xml文件下载相对应的jar包,下面为大家讲讲如何在win10系统中配置maven仓库. 首 ...

  10. 修改Maven仓库地址

    修改Maven仓库地址 在%USERPROFILE%\.m2\settings.xml例如:C:\Users\LongShu\.m2\settings.xml  可以自定义Maven的一些参数,  复 ...

最新文章

  1. 杭电1430康托 bfs(java)
  2. php中表单的非空验证,Javascript的表单与验证-非空验证_javascript技巧
  3. OpenCASCADE:Modeling Algorithms模块之拓扑工具
  4. Hibernate实体映射配置1(java@注解方式)
  5. Java描述设计模式(10):组合模式
  6. 一个简单的crontab
  7. Python课堂上我与学生斗智斗勇已8个学期
  8. Oracle 用户信息查询,操作语句
  9. SQL执行计划错误导致临时表空间不足
  10. CSS盒模型层次平面示意图和3D示意图
  11. php网页版进销存源码ERP多仓库管理系统源码
  12. ESP32-CAM模块网络摄像头demo加装舵机控制教程
  13. 大疆飞行模拟(DJI Flight Simulator)软件的使用
  14. vc中cout如何解除fixed控制_C++ fixed用法详解
  15. 温度传感器的一些比较
  16. 泰安链底层系统设计、核心优势、技术实现
  17. JNDI-Injection-With-LDAP-Unserialize
  18. Windows下Git服务(Bonobo)安装
  19. 施努卡:CCD视觉对位系统在贴合机的应用
  20. Android 打造万能圆点指示器

热门文章

  1. 美国3月通胀见顶了吗?
  2. 幼儿园门口摆个考勤机 家长接孩子得打卡
  3. s081-2020 Lab4 traps
  4. html输入公式得到混合运算结果,EXCEL公式与函数教案
  5. Springboot+高校考勤小程序 毕业设计-附源码131039
  6. 差分进化算法_差分进化变体-JADE
  7. 英国电信推出FTTP和G.fast新试点项目
  8. C语言练习题 日期天数转换
  9. C++ intptr_t类型
  10. 基于SSM实现宠物领养网站平台管理系统