maven 私服的使用及settings.xml的配置

settings中的配置

1、映射阿里中央仓库(下载jar包快一点)


   
    alimaven
    aliyun maven
    http://maven.aliyun.com/nexus/content/groups/public/
    central       
  

2、配置本地仓库(无需联网使用jar包)

E:\maven_repository

3、登录私服:


releases
admin
admin123


snapshots
admin
admin123

4、在客户端的 setting.xml 中配置私服的仓库(用于本地项目依赖私服项目)

 

dev 
 
 

nexus 

http://localhost:8081/nexus/content/groups/public/ 

 
true 
 

 
true 
 
 
 
 

 

public 
Public Repositories 
http://localhost:8081/nexus/content/groups/public/ 
 
 

5、激活仓库


dev

pom.xml配置(用于上传项目到私服上)



releases
http://localhost:8081/nexus/content/repositories/releases/


snapshots
http://localhost:8081/nexus/content/repositories/snapshots/


私服的安装NEXUS【了解】

一般公司早就有私服了。

你可能感兴趣的:(maven)