为什么要配置私库?
从中央仓库下载速度缓慢,而且有些jar包是公司私有的包不存在在中央仓库当中,所以我们需要配置私库。
首先去修改setting文件,在maven文件夹下的conf文件夹当中
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">
F:/.m2/repository
nexus-releases
admin (这里用的是默认的用户名和密码 一般普通的私库都会有)
admin123
nexus-snapshots
admin
admin123
nexus
*
Nexus Mirror.
http://localhost:8081/nexus/content/groups/public (在实际应用中如果连接的是别人的私库,localhost要改成对方的ip地址才行,路径也是不一样的)
nexus
nexus
Nexus
http://localhost:8081/nexus/content/groups/public/
(在实际应用中如果连接的是别人的私库,localhost要改成对方的ip地址才行,路径也是不一样的)
true
true
nexus
Nexus
http://localhost:8081/nexus/content/groups/public/
(在实际应用中如果连接的是别人的私库,localhost要改成对方的ip地址才行,路径也是不一样的)
true
true
central
central
http://central
true
true
central
http://central
true
true
nexus
central
在项目的pom文件中做如下设置
nexus-releases (注意id要与之前配的setting当中配的id对应)
Nexus Releases Repository (随意取名)
http://localhost:8081/nexus/content/repositories/releases/ (连接别人的私库需要改成对方的ip地址和路径)
nexus-snapshots
Nexus Snapshots Repository
http://localhost:8081/nexus/content/repositories/snapshots/
转自:https://www.xuebuyuan.com/1868949.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/127778.html