views:

359

answers:

2

I am using M2Eclipse (0.10.0, Maven 3)in projects. I can add Maven dependency using m2eclipse. But dependency jars couldn't be downloaded. Instead, it created a file in each local repo folder named [JAR_Name].jar.lastupdate. The content of this file is some thing like : http\://[REPO_URL]/central/=1276221188566

Even using Maven 3 command line. Jars couldn't be downloaded. Any idea about how could this happen?

A: 

I have the same problem. Don't know a 'real' solution, but whenever something isn't working I do a scan for .lastUpdated files in my local repo and delete them. Then things usually work again. (I think that might be due to a badly configured nexus, but unfortunately I don't have access to the nexus config)

seanizer
exactly. Currently my workaround is delete these .jar.lastupdated files.
DeepNightTwo
+2  A: 

First off, the presence of "lastupdated" file is irrelevant. We need to know the debug output (mvn -X dependency:tree). Then you mentioned you were using repository manager and mirroring every request to it - so setup settings.xml according to this guide . If you just specified the mirror element with repository manager location and what repositories (URLs) you want to proxy ,(without that profile enabled which is practically changing policy for getting snapshots), you would have something like "central repository disabled" messages in your debug log. After you fix it, it should work.

EDIT: You can always use the URL of group repository from maven settings.xml http://hostname/nexus/content/groups/public + path to the artifact like "org/apache/maven/someartifact/maven-metadata.xml" and see if nexus can proxy the request and serve what you want. If this works, then the reason must be either in maven settings or pom definition.

lisak
Thanks for your detail steps. I found this is a bug of Maven3/M2Eclipse. I gives a Progress Monitor to Maven and Maven updates Progress Monitor in Non-UI thread. It breaks the thread and jar downloading stops.
DeepNightTwo