Maven配置jar(war)包自动打包上传Maven服务器的配置

Maven配置jar(war)包自动打包上传Maven服务器的配置

 

  1. 创建jar(war)包工程
    1. 创建一个maven工程

    2. 在工程中穿件一个测试类

     

  2. 配置pom.xml

<distributionManagement>

    <repository>

<id>nexus-releases</id>

<url>http://127.0.0.1:8081/nexus/content/repositories/releases/</url>

</repository>

<snapshotRepository>

<id>nexus-snapshots</id>

<url>http://127.0.0.1:8081/nexus/content/repositories/snapshots/</url>

</snapshotRepository>

</distributionManagement>

 

  1. 配置setting文件

  2. 上传
    1. 使用eclipse上传

    2. 使用命令上传

  3. 查看上传是否成功

  4. 测试

    新建一个maven工程,在工程中引入提交的jar包

    书写测试方法

posted @ 2015-11-03 09:04  毛灬毛  阅读(1355)  评论(0编辑  收藏  举报