We version our snapshots with
<git_branchname>-SNAPSHOT in the build using
With a git branch called
lp-dummy-ga snapshot artifacts ends up stored like this in Nexus:
i.e. the version part is different in the path and in the artifact name.
That means in Nexus we get one folder per branch (like
test-branch-SNAPSHOT) containing one or more datetime-stamped snapshots.
The Remove Snapshots From Repository task does not clean in the desired way. It has Minimum snapshot count = 1. But it leaves one snapshot artifact per version folder, not per artifact. After a few years of coding there are over 1000 of these version folders and thus thousands of irrelevant artifacts. Not expected, not desired.
Is this working as intended from nexus side?
I don’t really understand how the storage format in Nexus is decided. In the mvn install step in the build the artifact is put in:
Next, in the mvn deploy it says:
Downloaded from aza.nexus: http://nexus.aza.se/content/repositories/snapshots/com/acme/lp-dummy/lp-dummy-ga/test-branch-SNAPSHOT/maven-metadata.xml
Uploaded to aza.nexus: http://nexus.aza.se/content/repositories/snapshots/com/acme/lp-dummy/lp-dummy-ga/test-branch-SNAPSHOT/lp-dummy-ga-test-branch-20210906.024720-12.jar
We use Nexus 2.14.