nexus 3.1 发布jar包

1.配置发布库

在工程pom.xml中配置:

    
        nexus_release
        Nexus Release Repository
        http://ip:8081/repository/maven-releases/
    
    
        nexus_snapshot
        Nexus Snapshot Repository
        http://ip:8081/repository/maven-snapshots/
    
也可以配置到settings.xml中,本文不采用。

2.在settings.xml配置用户权限:


      nexus_snapshot
      admin
      admin123
   

   
      nexus_release
      admin
      admin123

3. 上传

nexus 3以后不支持网页上传,所有使用命令上传:

mvn deploy:deploy-file -DgroupId=huawei -DartifactId=client-adapter -Dversion=0.3.12 -Dpackaging=jar -DrepositoryId=nexus_release -Dfile=D:/jar/client-adapter-sdk-java-oauth2-json-0.3.12.jar -Durl=http://localhost:8081/repository/maven-releases/ -DgeneratePom=true

nexus 3.1 发布jar包_第1张图片

4. 验证

nexus 3.1 发布jar包_第2张图片

上传成功。

你可能感兴趣的:(maven)