score:0

open your terminal, navigate to your eclipse's project directory and run:

mvn install

if mvn install doesn't update your dependencies, then call it with a switch to force update:

mvn install -u

this is a much safer approach compared to tampering with maven files as you delete ".lastupdated".

score:0

use this command inside the .m2/repository dir to rename all files:

for file in `find . -iname *.lastupdated`; do renamed=$(echo $file | rev | cut -c13- | rev); echo renaming: $file to $renamed; mv $file $renamed; done

this is usefull to not download all sources again.

this not work... the .jar is lost. :(

score:0

what i do when i encounter this issue:

make sure you have the version of the latest 'maven-source-plugin' plugin: https://maven.apache.org/plugins/maven-source-plugin/usage.html

$ mvn source:jar install 

now if the file *.lastupdate exist in your local ~/.m2/repositories/your-lib/0.0.1/ directory you can just remove it then run the command above again.

score:0

this is a side-effect of a failure to successfully extract from the repository. to get the actual content you want into your repository, check for correct paths to the repository/repositories within your pom file, and resolve certificate/security issues, if any. it is almost invariably one or the other of these issues.

there is no need to delete the .lastupdated entries, and doing so won't solve your problem.

score:2

you might have a problem with some of the artifacts to be retrieved from the repository. for example spring framework has its own repository. this xtension is appended when the artifact cannot fully downloaded. add the spring framework repository to your pom or settings.xml, delete the folder that include the broken jars and start again

score:2

if you hit this problem and you're using nexus, it might be the case that you have a routing rule defined, which is incorrect. i hit this myself and the files it was downloading were correctly named, at the proper url-s it was looking at, but they were all with the .lastupdated extension and an error message as contents.

score:7

i installed maven2 and ran mvn compile from the command line. this seems to have resolved the problem

score:14

as rperez said, i use to delete all those .lastupdated files. in linux i have created a little script to keep it simple:

find -name \*.lastupdated -exec rm -fv {} +

just create a file with the previous content and put it on your local maven repository. usually it will be ~/.m2/repository.

score:66

these files indicate to maven that it attempted to obtain the archive by download, but was unsuccessful. in order to save bandwidth it will not attempt this again until a certain time period encoded in the file has elapsed. the command line switch -u force maven to perform the update before the retry period. this may be necessary if you attempted to build while disconnected from the network.

the method of removing the files works with most versions of maven, but since the files are internal mementos to maven, i would not recommend this method. there is no guarantee that this information is not referenced or held elsewhere and such manipulation can damage the system.


Related Query

More Query from same tag