其他分享
首页 > 其他分享> > nexus私服知识概括

nexus私服知识概括

作者:互联网

nexus私服知识概括

nexus私服简介

私服:

私服软件:

Nexus仓库分类

简介:

配置本地Maven从nexus下载构件(pom.xml的方式):

<repositories>
    <repository>
        <id>maven-nexus</id>
        <url>http://localhost:8081/repository/maven-public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
<server>
  <id>maven-nexus</id>
  <username>admin</username>
  <password>admin123</password>
</server>

配置本地Maven从nexus下载构件(镜像方式):

<mirror>
  <id>mirror-nexus</id>
  <mirrorOf>*</mirrorOf>
  <name>nexus镜像</name>
  <url>http://localhost:8081/repository/maven-public/</url>
</mirror>
<server>
  <id>mirror-nexus</id>
  <username>admin</username>
  <password>admin123</password>
</server>

本地构件发布到私服:

nexus注意点

maven snapshot和release版本号之间的差别:

<groupId>cc.mzone </groupId>
<artifactId>m1 </artifactId>
<version>0.1-SNAPSHOT </version>
<packaging>jar </packaging>

LATEST版本:

maven发布部署到私服的依赖:

<server>    
  <id>nexus-releases</id>    
  <username>admin</username>    
  <password>admin123</password>    
</server>    
<server>    
  <id>nexus-snapshots</id>    
  <username>admin</username>    
  <password>admin123</password>    
</server>  
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
<build> 
	<finalName>${artifactId}-${version}-${maven.build.timestamp}</finalName>
</build>
<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <warName>manage-${version}</warName>
    </configuration>
</plugin>
<distributionManagement>
    <repository>
        <id>nexus-releases</id>
        <name>internal releases</name>
        <url>http://10.250.0.64:8081/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
        <id>nexus-snapshots</id>
        <name>internal snapshot</name>
        <url>http://10.250.0.64:8081/nexus/content/repositories/snapshots</url>
        <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
</distributionManagement>

快照与稳定版本总结:

nexus总结

总结:

标签:快照,nexus,私服,版本号,maven,概括,仓库
来源: https://blog.csdn.net/weixin_41005188/article/details/118658139