You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Dennis Lundberg <de...@apache.org> on 2008/06/02 16:31:49 UTC

Re: Migrating from a file: repository to Archiva

Wendy Smoak wrote:
> On Thu, May 29, 2008 at 12:44 PM, Dennis Lundberg <de...@apache.org> wrote:
> 
>> Hi
> 
> Welcome :)
> 
>> 1. Get the stuff from our file: repos into Archiva
>> Can we just tar/zip up the entire file repo and copy the whole thing over to
>> the data directory in Archiva?
> 
> The location for each repo is configurable, so you don't necessarily
> have to move them.  Once you decide where, configure each managed repo
> in Archiva.

I think you misunderstood me. We have already configured the Archiva 
repos to reside in a location outside of the Archiva installation, as 
per the docs.

The file: repo we have is on a completely other machine.

Anyway I copied everything from the file: repos to the Archiva repos and 
restarted Archiva. No matter how we tried rescanning and database 
updating we were not able to browse the jars from the old file: repo. I 
finally gave up and nuked the entire repo database. After a restart all 
artifacts were browsable.

> 
>> 2. Have the configuration in the "best" place
>>
>> I read the previous thread "Choosing which repositories you install to" with
>> interest. Judging by that, we should remove the <repositories> configuration
>> from our parent POM and move it into each developers settings.xml, right?
> 
> Consider creating a custom Maven distribution to use internally--
> replace conf/settings.xml with one that contains your internal
> repository config.  This also allows you to control (or at least
> influence) what version the developers are using, since you have the
> "official" one.
> 
> If that doesn't suit, then ~/.m2/settings.xml is the next best option.

We've had a discussion about this and came to the conclusion that using 
~/.m2/settings.xml will work best for us. The deciding factor was what 
we do most, upgrade Maven or add new developers. The former will happen 
more often so not having to patch the Maven distributions is a good 
thing for us.

>> 4. Use Archiva as a proxy
>> Set up a mirror configuration in every developers settings.xml like this
>>
>>    <mirror>
>>      <id>company.com</id>
>>      <name>Our Archiva Server</name>
>>      <url>http://archiva.company.com/archiva</url>
>>      <mirrorOf>*</mirrorOf>
>>    </mirror>
>>
>> So that all downloads, both for company internal artifacts and for open
>> source artifacts available in the central repo, will be made through
>> Archiva.
> 
> I've never seen a setup that has only *one* managed repository-- for a
> single mirror to work you'd have to have all your snapshots, releases,
> and third-party artifacts in a single repository.  At least, you would
> until the 'virtual repository' feature is released, unless you're
> willing to try out a snapshot.  I think I'd still group releases and
> snapshots separately, though I haven't experimented with that feature
> yet.

Without any mirror configuration one of our builds, that we used to test 
this on, downloaded all artifacts from Archiva instead of the central repo.


-- 
Dennis Lundberg