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 开发者_C百科Nexus Repository</id>
<url>myUrl</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Thanks
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
I think that a SNAPSHOT version of the artifact has reached your local maven repository (in ~/.m2
) before you disabled snapshots in <repositories>
. Now Maven is not able to download snapshots, but it is still able to use them from local storage.
Clean you ~/.m2
directory and try again.
精彩评论