- I have created a public repo in Bitbucket to hold all the releases and snapshot releases for me.
- I am using wagon-git to upload the jar to the releases repository.
Here are my entries in pom.xml:
<pluginRepositories>
<pluginRepository>
<id>synergian-repo</id>
<url>https://raw.github.com/synergian/wagon-git/releases</url>
</pluginRepository>
</pluginRepositories>
...
<distributionManagement>
<repository>
<id>my id</id>
<name>my repo name</name>
<url>my repo url</url>
</repository>
</distributionManagement>
...
<build>
<extensions>
<extension>
<groupId>ar.com.synergian</groupId>
<artifactId>wagon-git</artifactId>
<version>0.2.5</version>
</extension>
....
</build>
What I am doing:
mvn clean package
(creates snapshot version)mvn release:prepare
(creates the new release version and uploads that jar and tags appropriately into my git repository)- I checkin the updated pom.xml, release.properties etc.
mvn release:perform
- With this step I am expecting the new release version created by step 2 to be uploaded to my repository holding all the release jars.
Instead, mvn release:perform creates a new snapshot version and uploads that snapshot jar to the releases repository.
Question is: How do I manage to upload the non-snapshot release jar to the repository instead always creating and uploading a new snapshot version?
What am I missing?
I found a solution to my problem here: mvn release:prepare not committing changes to pom.xml…. The problem was that at the end of the release:prepare step, the pom.xml was not getting committed, and hence release:perform step was compiling and generating the snapshot version again. I am using maven-release-plugin 2.5.2 and maven-scm-provider-gitexe version 1.9.2