When I deploy a snapshot version of my project to Nexus the filename is stored in the snapshots repository with a timestamp suffix as follows:
my-lib-0.0.1-20151209.150900-1.jar
This is what I expect.
At the same time my local repository is updated with the new version of the snapshot but without the timestamp suffix. What is stored there is:
my-lib-0.0.1-SNAPSHOT.jar
I'm new to Maven and Nexus and have been playing around with them for a couple of days. Previously, the local repo was being updated with the same filename as what was in the Nexus snapshots repository.
Which property controls this behaviour?
These are the settings in my pom:
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<url>http://nexus.bxd.com:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>releases</id>
<url>http://nexus.bxd.com:8081/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
These are my server
settings in settings.xml
:
<servers>
<server>
<id>snapshots</id>
<username>deployment</username>
<password>***</password>
</server>
<server>
<id>releases</id>
<username>deployment</username>
<password>***</password>
</server>
</servers>
UPDATE
I've noticed that if I delete my local repo and deploy my library then the local repo is updated with my-lib-0.0.1-SNAPSHOT.jar
.
If I delete my local repo and build another library that depends on my-lib
then the local repo is updated with my-lib-0.0.1-SNAPSHOT.jar
and the latest timestamped version too.
<snapshotRepository>
add<uniqueVersion>true</uniqueVersion>
. – carlspringuniqueVersion
is ignored in version 3. – ksl