Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.23.0
-
Fix Version/s: 3.25.0
-
Component/s: Maven, Scheduled Tasks
-
Labels:
Description
Deploy a snapshot file into Nexus Repo that has packaging with multiple segments, such as "cpio.gz".
mvn deploy:deploy-file -DgroupId=com.somecompany -DartifactId=project -Dversion=1.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=cpio.gz -DrepositoryId=foo -Durl=http://localhost:8081/repository/maven-snapshots -Dfile=foo.cipo.gz
Observe that the GAV level maven-metadata correctly shows the extension:
<?xml version="1.0" encoding="UTF-8"?> <metadata modelVersion="1.1.0"> <groupId>com.somecompany</groupId> <artifactId>project</artifactId> <version>1.0.0-SNAPSHOT</version> <versioning> <snapshot> <timestamp>20200527.192712</timestamp> <buildNumber>1</buildNumber> </snapshot> <lastUpdated>20200527192712</lastUpdated> <snapshotVersions> <snapshotVersion> <extension>cpio.gz</extension> <value>1.0.0-20200527.192712-1</value> <updated>20200527192712</updated> </snapshotVersion> <snapshotVersion> <extension>pom</extension> <value>1.0.0-20200527.192712-1</value> <updated>20200527192712</updated> </snapshotVersion> </snapshotVersions> </versioning> </metadata>
Now run a task to rebuild the maven-metadata.xml file. After running, the extension will be incorrect:
<?xml version="1.0" encoding="UTF-8"?> <metadata modelVersion="1.1.0"> <groupId>com.somecompany</groupId> <artifactId>project</artifactId> <version>1.0.0-SNAPSHOT</version> <versioning> <snapshot> <timestamp>20200527.192712</timestamp> <buildNumber>1</buildNumber> </snapshot> <lastUpdated>20200527192855</lastUpdated> <snapshotVersions> <snapshotVersion> <extension>gz</extension> <value>1.0.0-20200527.192712-1</value> <updated>20200527192712</updated> </snapshotVersion> <snapshotVersion> <extension>pom</extension> <value>1.0.0-20200527.192712-1</value> <updated>20200527192712</updated> </snapshotVersion> </snapshotVersions> </versioning> </metadata>
Note that this file will be also be rebuilt when cleanup policies are applied, or the snapshot remover is run. So this bug is present in normal operation.
Also note that "tar.gz" files are not affected by this bug.
Attachments
Issue Links
- relates
-
NEXUS-24143 Allow Snapshot GAVs to have multiple segments when rebuilding metadata
-
- New
-