I am using version ranges in my maven POM:
<version>[3.0.0,)</version>
and for this particular artifact there is a 3.0.0 version in the repo and a 3.0.1-SNAPSHOT. When I try to do a release it fails as the SNAPSHOT version is used.
I have tried to get round this by editing my settings file to dis-allow the use of snapshots but it still fails:
<repositories>
<repository>
<id>EFX Nexus Repository</id>
<url>myUrl</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Thanks
Rule #3 Never release using the Time-Stamped snapshot The release plugin will still fail if you do this because it correctly understands you have SNAPSHOT dependencies. The plugin has a flag to allow bypass this check and people unfortunately use it far too often.
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.
Maven won't allow any other either. Build will fail if version is not found.
Snapshot simply means depending on your configuration Maven will check latest changes on a special dependency. Snapshot is unstable because it is under development but if on a special project needs to has a latest changes you must configure your dependency version to snapshot version.
This is basic maven issue.
When u fire multiple commands in single line..say mvn versions:resolve-ranges clean install...it will fetch SNAPSHOT when do release build.
Try with seperate execution of command.
first run mvn versions:resolve-ranges and then clen install
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