Infrastructure with maven, Jenkins, Nexus

前端 未结 5 1391
遥遥无期
遥遥无期 2020-12-12 21:16

We are using maven. I want to set up infrastructure, so that automatically built artifacts would go to Nexus repository. And then they could be used by developers.

I

5条回答
  •  借酒劲吻你
    2020-12-12 21:44

    I didn't need to make any changes to my projects pom.xml. Instead, in the jenkins "Post-build Actions" I selected "Deploy artifacts to Maven repository" then selected "Advanced" and set the Repository URL to http://nexusserver:8081/nexus/content/repositories/releases and the Repository ID to deploymentRepo.

    In the ~/.m2/settings.xml on the jenkins machine I added

    
      
        
          deploymentRepo
          deployment
          deployment123
        
      
       ...
    
    
    

提交回复
热议问题