You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Vandenschrick (JIRA)" <ji...@apache.org> on 2017/06/07 04:41:18 UTC

[jira] [Comment Edited] (MDEPLOY-221) deploy generates wrong timestamps in maven-metadata.xml

    [ https://issues.apache.org/jira/browse/MDEPLOY-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040154#comment-16040154 ] 

Vincent Vandenschrick edited comment on MDEPLOY-221 at 6/7/17 4:41 AM:
-----------------------------------------------------------------------

Hi Guillaume,
Unfortunately, it's not fixed. I've just tied the 3.0.0-SNAPSHOT and there is still 1 second of difference between the metadata.xml timestamp and the deployed file timestamp on certain artifacts. BTW, not sure it is actually linked to the deploy plugin since the 2.8.2 works correctly on maven < 3.5.0...

Here are the logs for the failing artifact :

deployment :
{{Uploading: dav:http://repository.jspresso.org/maven2-snapshots/org/jspresso/framework/jspresso-hibernate/4.3-SNAPSHOT/jspresso-hibernate-4.3-20170607.042314-72.jar
Uploaded: dav:http://repository.jspresso.org/maven2-snapshots/org/jspresso/framework/jspresso-hibernate/4.3-SNAPSHOT/jspresso-hibernate-4.3-20170607.042314-72.jar (78 kB at 76 kB/s)}}

And the failing build :
{{[ERROR] Failed to execute goal on project hrsample-core: Could not resolve dependencies for project org.jspresso.hrsample:hrsample-core:jar:4.3-SNAPSHOT: Could not find artifact org.jspresso.framework:jspresso-hibernate:jar:4.3-20170607.042315-72 in jspresso-snapshots-repository (http://repository.jspresso.org/maven2-snapshots) -> [Help 1]}}


was (Author: vvandens):
Hi Guillaume,
Unfortunately, it's not fixed. I've just tied the 3.0.0-SNAPSHOT and there is still 1 second of difference between the metadata.xml timestamp and the deployed file timestamp on certain artifacts. BTW, not sure it is actually linked to the deploy plugin since the 2.8.2 works correctly on maven < 3.5.0...

Here are the logs for the failing artifact :

deployment :
{{
Uploading: dav:http://repository.jspresso.org/maven2-snapshots/org/jspresso/framework/jspresso-hibernate/4.3-SNAPSHOT/jspresso-hibernate-4.3-20170607.042314-72.jar
Uploaded: dav:http://repository.jspresso.org/maven2-snapshots/org/jspresso/framework/jspresso-hibernate/4.3-SNAPSHOT/jspresso-hibernate-4.3-20170607.042314-72.jar (78 kB at 76 kB/s)
}}

And the failing build :
{{
[ERROR] Failed to execute goal on project hrsample-core: Could not resolve dependencies for project org.jspresso.hrsample:hrsample-core:jar:4.3-SNAPSHOT: Could not find artifact org.jspresso.framework:jspresso-hibernate:jar:4.3-20170607.042315-72 in jspresso-snapshots-repository (http://repository.jspresso.org/maven2-snapshots) -> [Help 1]
}}

> deploy generates wrong timestamps in maven-metadata.xml
> -------------------------------------------------------
>
>                 Key: MDEPLOY-221
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-221
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy
>    Affects Versions: 2.8.2
>            Reporter: Roland Illig
>
> When deploying an artifact to a Nexus server, the file {{maven-metadata.xml}} can end up with inconsistent timestamps.
> {noformat}
> [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)
> {noformat}
> The uploaded metadata file looks like this:
> {code:lang=xml}
> <?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>
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)