Maven发布源代码到私服

2018-08-23  本文已影响0人  爱蛇
  1. 配置发布目标远程仓库
<distributionManagement>
        <repository>
            <id>nexus-release</id>
            <url>http://xxxxxx/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshot</id>
            <url>http://xxxx/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
  1. 配置发布源代码插件
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <executions>
        <execution>
            <id>attach-sources</id>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>
  1. 执行发布命令
mvn clean deploy
上一篇下一篇

猜你喜欢

热点阅读