maven


The timestamp in snapshot jar's maven-metadata.xml is more than a second than the actual jar's timestamp?


I encountered a quirky problem:
I used "mvn deploy" (Maven 3.3.9, Jenkins 2.45, Nexus 2.12.0) to deploy a snapshot jar to my nexus in jenkins, result as below (suppose the jar name is userdao.jar):
Uploaded: myNexusIp/nexus/content/repositories/snapshots/xxx/1.0-SNAPSHOT/userdao-1.0-20170512.111840-6.jar
Uploaded: myNexusIp/nexus/content/repositories/snapshots/xxx/1.0-SNAPSHOT/maven-metadata.xml
The build was successful and everything was OK.
But when I built another maven project that depended above userdao.jar, error occurred as below:
Could not find artifact userdao:jar:1.0-20170512.111840-6 in public (http://myNexusIp/nexus/content/groups/public/)
After positioning I found that the timestamp in maven-metadata.xml in the nexus was more than a second than the actual jar's timestamp!
As below:
in maven-metadata.xml: 1.0-20170512.111840-6
actual existing snapshot jar: userdao-1.0-20170512.111839-6.jar
Because userdao-1.0-20170512.111840-6.jar did not exist in Nexus, the
right one should be userdao-1.0-20170512.111839-6.jar, so it errors.
Who can tell me why and how to resolve it?
The first thing to try is to rebuild your metadata on the repo where you uploaded your snapshot artifact.
See "Managing Scheduled Tasks"
Rebuild Maven Metadata Files
This task will rebuild the maven-metadata.xml files with the correct information and will also validate the checksums (.md5/.sha1) for all files in the specified Repository/Group.
Typically this task is run manually to repair a corrupted repository.

Related Links

How to use downloaded version of andromda to create and compile Project?
Github authentication: how to use Github as Maven repo when repo is private
How can I find doc for -Dparameters for maven plugin
What's the difference between maven-rpm-plugin and rpm-maven-plugin
flexmojos ignoring configuration?
Error in maven :No plugin found for the prefix 'get'
Maven site:deploy (with DIFFERENT url) during “deploy” goal (when in testing profile)?
Plugin execution not covered by lifecycle configuration maven error
Andromda Project Creation Using Maven
Maven release plugin adding trunk folder under release tag for release:prepare goal
Why maven meta-data doesn't include specific version of all artifacts
Error when using javac: “javac: invalid flag: -s”
Executing acceleo project with maven
create html file from pom.xml
Using javah maven-antrun-plugin with jdk 1.7, classes.jar became tools.jar
Maven: Report using deprecated classes / methods

Categories

HOME
image
gitlab
testng
debugging
ngrx
lodash
dot
cplex
rsync
spring-cloud-stream
rubygems
dxl
webpack-2
angular-ui-bootstrap
mvvmcross
fancybox
qore
facebook-php-sdk
php-7.1
hapi
decomposition
iolanguage
opentracing
footer
invantive-sql
django-cms
scichart
nas
xlsxwriter
mustache.php
telerik-reporting
shopware
linkerd
elasticsearch-net
large-file-upload
bcd
kendo-ui-grid
vsts-build-task
force-layout
fusionpbx
xcode-extension
neuroscience
starteam
streamreader
mapzen
gzipstream
ncalc
glew
netcdf4
thin
galleria
dotcover
youcompleteme
pubmed
minimization
quartz-composer
wdf
mathematica-frontend
connect-by
itextpdf
photobucket
netmq
freelancer.com-api
marching-cubes
comobject
iis-arr
emailrelay
deis
ideamart
ami
census
dundas
unity5.2.3
phalanger
javafx-webengine
neolane
jquery-layout
rebol3
dealloc
stxxl
intentservice
mcts
ms-project-server-2010
commoncrypto
dataservice
robotics-studio
distutils
chuck
nsnetservice
rdoc
ticoredatasync
uiviewanimation-curve
heartbeat
horizontal-accordion
disclosure
remember-me
fluent-interface
h.323
nsviewanimation
substrings
audio-capture
sef
pascal-fc
ubuntu-9.04
signal-handling
windows-live-messenger

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App