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)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?
release:perform will fork a new Maven instance to build the checked-out project. This new Maven instance will use the same system configuration and Maven profiles used by the one running the release:perform goal.
A snapshot version is a version that has not yet been released. The general idea is to have a snapshot version before the released version.
A Maven snapshot is a special version of a Maven package that refers to the latest production branch code. It is a development version that precedes the final release version. You can identify a snapshot version of a Maven package by the suffix SNAPSHOT that is appended to the package version.
Artifacts with a newer timestamp take precedence no matter where they come from. With the default settings "remote timestamps" are checked only once every 24 hrs.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With