Externalising SCM credentials with Maven

前端 未结 4 1277
名媛妹妹
名媛妹妹 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:05

    I've managed to get this to work by using the solution provided above i.e. adding a new server configuration to my settings.xml and giving the domain name as the id.

    
      domain.name:port
      [username]
      [password]
    
    

    In addition to the previous answer, if you are specifying a port in your URL this also need to be included in the server.id. Another quirk that I found is that you need to put the password in quotes if it contains any characters that might interfere with the command line call.

    You cannot use the following in your $user.home/.scm/svn-settings.xm as it is not valid! There are no such elements as and under (as specified here )

    
      [svn user]
      [svn password]
    
    

提交回复
热议问题