首页 > 学院 > 开发设计 > 正文

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

2019-11-14 15:11:49
字体:
来源:转载
供稿:网友

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包

    书写测试方法


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表