Externalising SCM credentials with Maven

前端 未结 4 1287
名媛妹妹
名媛妹妹 2020-11-30 00:27

Is there a method to externalize my SCM credentials so they are not stored in the project\'s POM? The problem being if they\'re contained in the project\'s POM, they will b

4条回答
  •  不知归路
    2020-11-30 01:04

    For some SCM providers you can specify your credentials in the section of settings.xml. As an use the domain name of your repository. This works for me with mercurial. SubVersion works too.

    For example, given my pom.xml contains:

    
      scm:hg:http://jukito.googlecode.com/hg/
      scm:hg:https://jukito.googlecode.com/hg/
      http://code.google.com/p/jukito/source/browse/
    
    

    Then I can specify my credentials in settings.xml as such:

    
      jukito.googlecode.com
      philippe.beaudoin
      1234567890ABC
    
    

提交回复
热议问题