美文网首页
nexus私服搭建

nexus私服搭建

作者: peteLee | 来源:发表于2018-11-28 15:51 被阅读0次

    推荐搭建nexus2.x

    从仓库下载的配制信息

    1. setting.xml
    <mirrors>
        <mirror>
              <id>nexus</id>
              <mirrorOf>central</mirrorOf>
              <url>http://ip:8081/nexus/content/groups/public/</url>
        </mirror>
    </mirrors>
    
    <profiles>
        <profile>
            <id>development</id>
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </repository>
            </repositories>
    
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
      
    <activeProfiles>
        <activeProfile>development</activeProfile>
    </activeProfiles>
    

    其中 http://ip:8081/nexus/content/groups/public/指向

    1.png

    DEPLOY jar到私服

    1. setting.xml
    <servers>
        <server>
            <id>releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>Snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>
    
    1. pom.xml
    <distributionManagement>
            <repository>
                <!-- id 与setting.xml中对应id相同 ,下同-->
                <id>releases</id>
                <url>http://192.168.130.50:8081/nexus/content/repositories/releases/</url>
            </repository>
            <snapshotRepository>
                <id>Snapshots</id>
                <url>http://192.168.130.50:8081/nexus/content/repositories/snapshots/</url>
            </snapshotRepository>
    </distributionManagement>
    
    2.png

    相关文章

      网友评论

          本文标题:nexus私服搭建

          本文链接:https://www.haomeiwen.com/subject/hetzqqtx.html