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

maven plugin for docker (e.g. to run with needed db)
Is kapt supported in maven?
Howto retrieve the latest Snapshot from Nexus OSS 3.0
Maven versioning in a parallel development process
Compile failure in Jenkins
How to access files from module using maven without searching it in local .m2 repository & central maven repository?
passing version of a dependency during a release build in maven
Get maven properties from external configuration file
How does Maven handle transitive dependencies inherited from parent?
maven build error : No plugin found for prefix 'system' in the current project [duplicate]
cucumber.runtime.CucumberException: Failed to instantiate class
Jenkins fails to parse POM with variables
How can I stop generating md5, sha1 jars being created in maven
Issue with Jenkins pipeline script and docker maven image
How to override maven project version in teamcity
SnappyData version 0.6 not found in Maven

Categories

HOME
date
amazon-ec2
openstack
urbancode
drivers
tinymce
lodash
bpmn
cvs
react-redux
webpack-2
installshield
blueprintjs
mvvmcross
esper
gorm
tomcat6
kentor-authservices
wheelnav.js
resize
alignment
dynamics-crm-online
systemc
progressive-web-apps
windows-7-x64
reactcsstransitiongroup
reactive-cocoa
database-replication
karma-jasmine
xlsxwriter
sox
dcevm
bootstrap-tour
claims-based-identity
angular2-aot
apache-commons-io
selectedindexchanged
intel-pin
user-interaction
social-media
elasticsearch-ruby
opentype
facebook-apps
tasklet
uisplitview
xmlreader
android-ble
lumberjack
cookiecutter-django
unoconv
optix
ruby-on-rails-3.1
isbn
flashair
acoustics
node-sass
promela
return-value
composite-key
snmptrapd
sqldf
synchronous
root-framework
dstu2-fhir
login-control
trash
merge-conflict-resolution
sigabrt
packagist
whois
ios8-today-widget
android-listview
ionic
tableau-online
php-ci
mono-embedding
apache-commons-fileupload
ami
pretty-print
jsapi
gwidgets
codeigniter-routing
markers
onactivityresult
uitouch
yorick
valuechangelistener
jboss-weld
fmod
coverflow
easy-install
jplaton
mylyn
django-nonrel
ember-app-kit
html-editor
jquery-knob
mt
jquery-ui-layout
vdsp
netbeans-7.1
routedevent
preference
user-friendly
noscript
zune
geneva-server

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