首页 > 代码库 > maven 发布到 本地仓库

maven 发布到 本地仓库

<!-- 发布命令 -->
    <distributionManagement>
        <repository>
            <id>nexus_release</id>
            <name>Nexus ReleaseRepository</name>
            <url>http://localhost:8081/nexus/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>nexus_snapshot</id>
            <name>Nexus SnapshotRepository</name>
            <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

setting.xml 中

       <server>
        <id>nexus_release</id>
        <username>admin</username>
        <password>admin123</password>
      </server>

      <server>
        <id>nexus_snapshot</id>
        <username>admin</username>
        <password>admin123</password>
      </server>

发布命令

clean deploy

 

更新子模块版本命令:

mvn versions:update-child-modules

maven 发布到 本地仓库