1

When releasing an artifact with maven-release-plugin, the changes made to the artifact version are local and not pushed to the remote git repository.

The following is the configuration I used for the maven-release-plugin:

<configuration>
    <goals>pre-integration-test</goals>
    <preparationGoals>package</preparationGoals>
    <releaseProfiles>releases</releaseProfiles>
</configuration>

I did some research and found out I need to add the following dependency maven-scm-plugin, but not sure how to configure it along with the maven release plugin.

Bionix1441
  • 2,135
  • 1
  • 30
  • 65
  • 1
    The dependency to maven-scm-plugin is not needed nor necessary cause maven-release-plugin handles that itself. Why have you changed the default configuration of maven-release-plugin? – khmarbaise Aug 14 '20 at 13:51
  • Somehow it is needed, without it maven release does not push the changes performed on the `pom.xml` to git, as a consequence keeps releasing the snapshot version. – Bionix1441 Aug 17 '20 at 08:25
  • Which maven-release-plugin version do you use? Sounds like you are using a very old one..please post a link to your project.... – khmarbaise Aug 17 '20 at 08:27
  • I use the version 2.5.3 of maven-release-plugin, I have documented below how I solved the problem – Bionix1441 Aug 17 '20 at 08:30
  • How does your scm part in your pom look like? – khmarbaise Aug 17 '20 at 10:52
  • see the answer below. – Bionix1441 Aug 18 '20 at 12:40
  • I don't want to see the dependencies. The SCM part https://maven.apache.org/pom.html#SCM – khmarbaise Aug 18 '20 at 13:07
  • Well it was configured properly from the beginning, the connection, developerConnection and tag. Without the url it still works.I have admin rights on the developerConnetion. That was not my problem :) – Bionix1441 Aug 18 '20 at 13:41

1 Answers1

0

I have solved the problem by adding the following dependency to the plugin dependencies:

 <dependencies>
    <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-gitexe</artifactId>
       <version>1.11.2</version>
    </dependency>
 </dependencies>

Now maven pushes the changes made to the pom.xml after running mvn release:prepare and mvn release:perform

Bionix1441
  • 2,135
  • 1
  • 30
  • 65