Multiple deployments in maven

前端 未结 4 1708
后悔当初
后悔当初 2021-01-02 06:51

We have a internal artifactory repository. At the moment all snapshots will be deployed there. We also want to have a different server with a web interface, and want to copy

4条回答
  •  时光取名叫无心
    2021-01-02 07:53

    I don't think maven supports deploying to multiple repositories for a single profile, but perhaps profiles could change the id and urls of the repository.

      
        
          ${repo-id}
          ${repo-name}
          ${repo-url}
        
      
    

    Maven Deployment

    Then use profiles to pick which repo to deploy to:

    
      
        repo1
        
          true
        
        
          repo1
          Repo1 Name 
          http://url.com/maven2
        
      
      
        repo2
        
          repo2
          Repo2 Name 
          http://url2.com/maven2
        
      
    
    

    Maven profiles

提交回复
热议问题