You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jonah Graham (Jira)" <ji...@apache.org> on 2022/05/02 16:14:00 UTC

[jira] [Created] (MGPG-85) Regression in maven-metadata between 1.6 and 3.0.1

Jonah Graham created MGPG-85:
--------------------------------

             Summary: Regression in maven-metadata between 1.6 and 3.0.1
                 Key: MGPG-85
                 URL: https://issues.apache.org/jira/browse/MGPG-85
             Project: Maven GPG Plugin
          Issue Type: Bug
    Affects Versions: 3.0.1
            Reporter: Jonah Graham


Hello, on the Eclipse LSP4J project we use gpg:sign-and-deploy-file to upload files to Nexus snapshots. As we didn't specify version number when 3.0.1 was released last year we started using it automatically instead of 1.6 which we had been using previously.

In 3.0.1 the buildNumber of multiple files uploaded together are different, e.g. you get a maven-metadata that looks like this:

 
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
  <groupId>org.eclipse.lsp4j</groupId>
  <artifactId>org.eclipse.lsp4j</artifactId>
  <versioning>
    <lastUpdated>20220429053938</lastUpdated>
    <snapshot>
      <timestamp>20220429.053938</timestamp>
      <buildNumber>94</buildNumber>
    </snapshot>
    <snapshotVersions>
      <snapshotVersion>
        <classifier>javadoc</classifier>
        <extension>jar</extension>
        <value>0.13.0-20220429.053938-94</value>
        <updated>20220429053938</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>sources</classifier>
        <extension>jar</extension>
        <value>0.13.0-20220429.053938-93</value>
        <updated>20220429053938</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>jar</extension>
        <value>0.13.0-20220429.053938-92</value>
        <updated>20220429053938</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>pom</extension>
        <value>0.13.0-20220429.053938-92</value>
        <updated>20220429053938</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
  <version>0.13.0-SNAPSHOT</version>
</metadata> {code}
Note above how the snapshotVersions have -92, -93 and -94 for the different classifiers. This is (I believe) a bug, and a regression (or at least change in behaviour) since 1.6. In 1.6 we get this:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
  <groupId>org.eclipse.lsp4j</groupId>
  <artifactId>org.eclipse.lsp4j</artifactId>
  <versioning>
    <lastUpdated>20220502160227</lastUpdated>
    <snapshot>
      <timestamp>20220502.160227</timestamp>
      <buildNumber>105</buildNumber>
    </snapshot>
    <snapshotVersions>
      <snapshotVersion>
        <extension>jar</extension>
        <value>0.13.0-20220502.160227-105</value>
        <updated>20220502160227</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>pom</extension>
        <value>0.13.0-20220502.160227-105</value>
        <updated>20220502160227</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>javadoc</classifier>
        <extension>jar</extension>
        <value>0.13.0-20220502.160227-105</value>
        <updated>20220502160227</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>sources</classifier>
        <extension>jar</extension>
        <value>0.13.0-20220502.160227-105</value>
        <updated>20220502160227</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
  <version>0.13.0-SNAPSHOT</version>
</metadata>
 {code}
Where all the parts are -105.

This issue causes a concrete problem as gradle cannot consume such snapshots - see [https://github.com/gradle/gradle/issues/20605] 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)