You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Em DauPhu <em...@gmail.com> on 2010/09/15 10:23:36 UTC

mixing local repo and managed repo

Hi,

I came across a continuous integration server hosting both an Hudson
and an Archiva (as a proxy to our central). The settings.xml used in
maven builds declare as the local repo the managed repository of the
archiva.
Is that wrong to use as a local repository (declared in the maven
settings.xml) the actual managed repository of the archiva proxy? Can
it leads to any trouble ?

Thank you,
Em.

Re: mixing local repo and managed repo

Posted by Brett Porter <br...@apache.org>.
On 15/09/2010, at 8:30 PM, Em DauPhu wrote:

> I asked the same question on the maven mailing list and I got the
> following answer:
> 
> "Yes, first local and remote maven repository doesn't contain the same
> metadata.
> And by the way, accessing a local repository by many instances isn't
> concurrent-safe (at least, in maven 2, I don't know precisely what's been
> done for maven 3, particularly along the parallel build evolution). So, both
> must be avoided.
> 
> You also better want to isolate every hudson build from each other, having a
> local repository by job. And wiping those jobs regularly.
> http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/
> <http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/>And
> a specific setting for hudson on my blog:
> http://batmat.net/blog/post/2009/10/09/[Hudson]-How-to-set-a-private-maven-repository-by-job-and-easily-be-able-to-delete-them
> 
> Cheers"
> 
> If somebody from here have a different opinion, I'm still interested.

Nope, that's correct.

Technically, it will mostly work. But you will fill the remote repo with metadata it may not use. If you have differing repository IDs you could corrupt the metadata. Maven may corrupt the metadata on its own as mentioned.

There's little benefit other than the disk space saved. Given how fast Hudson would pull the artifacts from Archiva, you could regularly purge the local repository and not have to worry too much about that.

I wouldn't recommend it :)

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/





Re: mixing local repo and managed repo

Posted by Em DauPhu <em...@gmail.com>.
I asked the same question on the maven mailing list and I got the
following answer:

"Yes, first local and remote maven repository doesn't contain the same
metadata.
And by the way, accessing a local repository by many instances isn't
concurrent-safe (at least, in maven 2, I don't know precisely what's been
done for maven 3, particularly along the parallel build evolution). So, both
must be avoided.

You also better want to isolate every hudson build from each other, having a
local repository by job. And wiping those jobs regularly.
http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/
<http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/>And
a specific setting for hudson on my blog:
http://batmat.net/blog/post/2009/10/09/[Hudson]-How-to-set-a-private-maven-repository-by-job-and-easily-be-able-to-delete-them

Cheers"

If somebody from here have a different opinion, I'm still interested.

Thank you,
Em.

On Wed, Sep 15, 2010 at 10:23 AM, Em DauPhu <em...@gmail.com> wrote:
> Hi,
>
> I came across a continuous integration server hosting both an Hudson
> and an Archiva (as a proxy to our central). The settings.xml used in
> maven builds declare as the local repo the managed repository of the
> archiva.
> Is that wrong to use as a local repository (declared in the maven
> settings.xml) the actual managed repository of the archiva proxy? Can
> it leads to any trouble ?
>
> Thank you,
> Em.
>