Uploaded image for project: 'Maven Deploy Plugin'
  1. Maven Deploy Plugin
  2. MDEPLOY-221

deploy generates wrong timestamps in maven-metadata.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.8.2
    • None
    • deploy:deploy
    • None

    Description

      When deploying an artifact to a Nexus server, the file maven-metadata.xml can end up with inconsistent timestamps.

      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 24 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 171 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76.jar
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76.jar (18 kB at 591 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76.pom
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76.pom (2.2 kB at 71 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 92 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 92 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 59 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 43 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 33 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 40 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-sources.jar
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-sources.jar (12 kB at 386 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 92 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 59 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 65 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 37 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-test-sources.jar
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-test-sources.jar (10 kB at 286 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 109 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 65 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 51 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 36 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-obfuscated.jar
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-obfuscated.jar (29 kB at 771 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 86 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 27 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 48 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 39 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-javadoc.jar
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-javadoc.jar (76 kB at 2.1 MB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 92 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 61 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 59 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 39 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-tests.jar
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/artifactId-31.0.0-20170510.070327-76-tests.jar (20 kB at 604 kB/s)
      [INFO] Downloading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Downloaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 63 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 54 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/31.0.0-SNAPSHOT/maven-metadata.xml (1.9 kB at 65 kB/s)
      [INFO] Uploading: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml
      [INFO] Uploaded: http://nexus-url/content/repositories/snapshots/groupId/artifactId/maven-metadata.xml (1.2 kB at 34 kB/s)
      

      The uploaded metadata file looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <metadata modelVersion="1.1.0">
        <groupId>groupId</groupId>
        <artifactId>artifactId</artifactId>
        <version>31.0.0-SNAPSHOT</version>
        <versioning>
          <snapshot>
            <timestamp>20170510.070328</timestamp>
            <buildNumber>76</buildNumber>
          </snapshot>
          <lastUpdated>20170510070328</lastUpdated>
          <snapshotVersions>
            <snapshotVersion>
              <extension>jar</extension>
              <value>31.0.0-20170510.070328-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
            <snapshotVersion>
              <extension>pom</extension>
              <value>31.0.0-20170510.070328-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
            <snapshotVersion>
              <classifier>sources</classifier>
              <extension>jar</extension>
              <value>31.0.0-20170510.070327-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
            <snapshotVersion>
              <classifier>test-sources</classifier>
              <extension>jar</extension>
              <value>31.0.0-20170510.070327-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
            <snapshotVersion>
              <classifier>obfuscated</classifier>
              <extension>jar</extension>
              <value>31.0.0-20170510.070327-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
            <snapshotVersion>
              <classifier>javadoc</classifier>
              <extension>jar</extension>
              <value>31.0.0-20170510.070327-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
            <snapshotVersion>
              <classifier>tests</classifier>
              <extension>jar</extension>
              <value>31.0.0-20170510.070327-76</value>
              <updated>20170510070328</updated>
            </snapshotVersion>
          </snapshotVersions>
        </versioning>
      </metadata>
      

      Some of the timestamps in that file have second 27, while others have second 28. The uploaded files all have 27 in their file names, therefore the information in the metadata file is wrong, and the files cannot be downloaded.

      We didn't notice this problem until three days ago, when we updated from Maven 3.3.9 to 3.5.0. Both of these Maven versions use version 2.8.2 of the plugin.

      Running mvn install alone does not have this problem since no version timestamps are used there; the version numbers are just 31.0.0-SNAPSHOT there.

      Attachments

        Issue Links

          Activity

            People

              gboue Guillaume Boué
              rillignm Roland Illig
              Votes:
              3 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: