Maven release plugin git credentials
Based on the docs you have to use a special property, project.scm.id
, to define the id of the appropriate server entry in your settings.xml file.
<properties> <project.scm.id>my-scm-server</project.scm.id></properties>
And the following in your settings.xml file:
<settings> <servers> <server> <id>my-scm-server</id> <username>myUser</username> <password>myPassword</password> </server> </servers></settings>
BTW: Check if you are using the most recent version of maven-release-plugin. The project.scm.id enhancement was introduced in version 2.3 as part of ticket MRELEASE-420. For example if you are using Maven 3.0.5 then you are by default only using version 2.0 of the maven-release-plugin. Much too old. Fix by adding something like below to your POM:
<build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.3</version> </plugin> </plugins> </pluginManagement></build>