码迷,mamicode.com
首页 > 其他好文 > 详细

seeting.xml

时间:2017-12-31 12:58:20      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:http   pass   enabled   mave   localhost   镜像   aging   mvn   active   

settings.xml 中配置

1,jar包将优先从此配置仓库下载

<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://,localhost/repository/maven-public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://localhost/repository/maven-public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>

 

2,

<server>
<id>base-snapshot</id>
<username>deployment</username>
<password>deployment123</password>
</server>

<server>
<id>base-release</id>
<username>deployment</username>
<password>deployment123</password>
</server>

<server>
<id>base-3rdPart</id>
<username>deployment</username>
<password>deployment123</password>
</server>

 

3,jar包将强制从此镜像下载

<mirror>
<id>longen</id>
<name>longen</name>
<url>http://localhost/repository/maven-public/</url>
<mirrorOf>*</mirrorOf>
</mirror> 

4,上传nexus第三方jar,for example :jd。sdk

mvn deploy:deploy-file -DgroupId=com.jd.open.api -DartifactId=open-api-sdk -Dversion=2.0 -Dpackaging=jar -Dfile=D:\jd-sdk-2.0.jar -Durl=http://localhost/repository/3rd_part/ -DrepositoryId=base-3rdPart

5,maven 打jar命令

mvn clean package -Dmaven.test.skip=true

seeting.xml

标签:http   pass   enabled   mave   localhost   镜像   aging   mvn   active   

原文地址:https://www.cnblogs.com/sycode/p/8157378.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!