You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien CARSIQUE <jc...@nuxeo.com> on 2009/03/17 14:56:25 UTC

Is there a way to verify/check/repair a local repository ?

Hello,

I had issues building my project but strangely it was building fine on 
other computers.
So, I tried the following steps:
    mv ~/.m2/repository ~/.m2/repository.old
    => build ok
    mv ~/.m2/repository ~/.m2/repository.new && mv ~/.m2/repository.old 
~/.m2/repository && cp -rf ~/.m2/repository.new/* ~/.m2/repository/
    => build ok

Using diff, I saw that a few files differ (xml, pom, jar, sha1, ...) so 
it seems there was something "broken" in my local repository. Deleting 
it is not a very convenient solution.
Is there a way to verify/check/repair a local repository (I tried -U 
option without success) ?

Thanks,

-- 
Julien Carsique, Nuxeo (Paris, France)
www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87



Re: Is there a way to verify/check/repair a local repository ?

Posted by Tim <ch...@gmail.com>.
I'm actually having the same problem.After alot of debugging I noticed
something interesting.

-rw-r--r-- 1 tich tich 1482491 common-util-25-20090313.151759-9.jar
-rw-r--r-- 1 tich tich 1482490 common-util-25-20090317.001243-13.jar
-rw-r--r-- 1 tich tich 1482491 common-util-25-SNAPSHOT.jar

I've snipped out all the non relevant info. Notice the size of -SNAPSHOT?
It is actually different from the size of the latest released version
(snapshot -13).
Since the -SNAPSHOT jar is used in the classpath instead of the
actual -2009xxx.xxxx  versions it will fail the build.
It seems that something in maven's mechanism for replacing the SNAPSHOT jars
will occasionally break. I haven't had time to look into exactly what it is
but this is likely the source of your build errors. Notice that this only
effects -SNAPSHOT jars so I don't know if that is true in your scenario.

On Tue, Mar 17, 2009 at 8:56 AM, Julien CARSIQUE <jc...@nuxeo.com>wrote:

> Hello,
>
> I had issues building my project but strangely it was building fine on
> other computers.
> So, I tried the following steps:
>   mv ~/.m2/repository ~/.m2/repository.old
>   => build ok
>   mv ~/.m2/repository ~/.m2/repository.new && mv ~/.m2/repository.old
> ~/.m2/repository && cp -rf ~/.m2/repository.new/* ~/.m2/repository/
>   => build ok
>
> Using diff, I saw that a few files differ (xml, pom, jar, sha1, ...) so it
> seems there was something "broken" in my local repository. Deleting it is
> not a very convenient solution.
> Is there a way to verify/check/repair a local repository (I tried -U option
> without success) ?
>
> Thanks,
>
> --
> Julien Carsique, Nuxeo (Paris, France)
> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
> jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



-- 

Joan Rivers  - "I knew I was an unwanted baby when I saw that my bath toys
were a toaster and a radio."