maven打jar包,提交私服

1.mvn clean package :打包
2.mvn clean deploy:部署上传私服

如果打包时,显示对应test有问题,可以直接略过:-Dmaven.test.skip=true -Dmaven.javadoc.skip=true

部署的时候pom中需要有对应的私服地址,包括releases,snapshots
比如:
<distributionManagement>
    <repository>
        <id>iBlue-releases</id>
        <url>http://10.200.180.48:8081/nexus/content/repositories/releases/</url>
    </repository>
    <snapshotRepository>
        <id>iBlue-snapshots</id>
        <url>http://10.200.180.48:8081/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>
</distributionManagement>

出现的问题:如果在运行clean的时候提示诸如can't delete targer这样的问题,基本是因为本地运行着程序,所以不能清空target,需要关闭。

猜你喜欢

转载自lvxing607.iteye.com/blog/2390837