Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.26.0, 3.25.1, 3.26.1
-
Fix Version/s: 3.27.0
-
Component/s: Maven, Scheduled Tasks
-
Labels:
Description
Reproduce steps....
Publish 4 timestamped snapshots to the same GAV into a hosted maven snapshot repository using Maven. Then ran a snapshot remover task against that repository with minimum count 2, and retention days 0.
The GAV maven-metadata.xml file is removed. The GA level file is not removed.
Attempting to access the file with either HEAD or GET requests results in a 404 response.
$ curl --head http://localhost:8081/repository/maven-snapshots/com/group/binaries/some-project/1.0-SNAPSHOT/maven-metadata.xml HTTP/1.1 404 com/group/binaries/some-project/1.0-SNAPSHOT/maven-metadata.xml Server: Nexus/3.26.0-04 (PRO) X-Content-Type-Options: nosniff Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation X-XSS-Protection: 1; mode=block Cache-Control: no-cache, no-store, max-age=0, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Expires: 0 X-Frame-Options: DENY Content-Type: text/html Content-Length: 1948
This causes subsequent builds that are trying to retrieve the snapshot to fail.
Retrieving the GA level maven-metadata.xml file triggers a rebuild, and the GAV level file is available afterwards.
It seems to me the bug here is that the GAV level file is removed? It should be left in place and marked as needing rebuild. This is what happens to the GA level file.
This is a regression introduced in 3.25.1
Attachments
Issue Links
- is related to
-
NEXUS-21138 Snapshot remover leaves maven-metadata.xml files deleted for a long time, breaking builds.
-
- Closed
-