Hi everyone,
Thanks, Dennis, for your input.
I take up this old thread in order to present a slighlty different
configuration. There are two differences in our setting compared to
Dennis's:
1. Our repositories aren't configured in the settings.xml, but in the
company pom.
2. We have two repositories (snapshot and internal) for each project and one
common repository for the entire company.
Our company has been using archvia only since very recently. I'd be curious
if there are any comments on our configuration.
Best,
andi
== settings.xml ====
<settings>
<servers>
<server>
<id>myproject.internal</id>
<username>myUserId</username>
<password>secretPassword</password>
</server>
<server>
<id>myproject.snapshots</id>
<username>myUserId</username>
<password>secretPassword</password>
</server>
</servers>
</settings>
== (parent) pom.xml ====
<project>
...
<distributionManagement>
<snapshotRepository>
<id>myproject.snapshots</id>
<url>
dav:
http://repo.mycompany.com:8082/archiva/repository/myproject.snapshots/
</url>
</snapshotRepository>
<repository>
<id>myproject.internal</id>
<url>
dav:
http://repo.mycompany.com:8082/archiva/repository/myproject.internal/
</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>myproject.snapshots</id>
<name>My Project Managed Snapshot Repository</name>
<url>
http://repo.mycompany.com:8082/archiva/repository/myproject.snapshots/
</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>myproject.internal</id>
<name>My Project Managed Release Repository</name>
<url>
http://repo.mycompany.com:8082/archiva/repository/myproject.internal/
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>common</id>
<name>MyCompany Managed Common Repository</name>
<url>
http://repo.mycompany.com:8082/archiva/repository/common/
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
==========================
-----Ursprüngliche Nachricht-----
Von: Dennis Lundberg [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 2. Juni 2008 16:47
An: [email protected]
Betreff: Re: Choosing which repositories you install to
EJ Ciramella wrote:
> After 24 hours I've had a chance to regroup my thoughts (Dennis L's line
> of questioning parallels some of mine as well).
>
> We have the following goals:
>
> 1 - Move our poorly managed "bertha" repository to be a retired (but
> still available for downloads) repository.
We will probably shut down our old repo completely once the new one is
populated and all developers have configured Maven properly, see more on
that below. Is there a reason why you want to keep bertha alive?
> 2 - Proxy all other repositories (and set up at least one additional
> mirror for each).
> 3 - Create new managed repositories for our projects (one snapshot and
> one "release" repository for each).
> 4 - Reduce the amount of configuration managed by maven 2 consumers.
>
> Ideally, if people had an entry in settings.xml for a repository, it'd
> be a single entry pointing to archiva (is this even possible?). In the
> various projects, via <distributionManagement>, we'd configure the two
> repositories for the projects (snapshot/release). We only have (and
> likely will only ever have) two real projects so there will only be four
> active internally managed repositories.
We ended up with this in each developer's settings.xml:
<settings>
<servers>
<server>
<id>internal</id>
<username>myUserId</username>
<password>secretPassword</password>
</server>
<server>
<id>snapshots</id>
<username>myUserId</username>
<password>secretPassword</password>
</server>
</servers>
<profiles>
<profile>
<id>Repository Proxy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
<url>http://repo.company.com/archiva/repository/internal/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<name>Archiva Managed Snapshot Repository</name>
<url>http://repo.company.com/archiva/repository/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
The servers section authenticates the user to the repos.
The profiles section gives the developer access to the repo so that they
can download from it. This includes getting hold of the company parent
POM which can otherwise be a chicken-and-egg problem.
This is combined with the following snippet in the company parent POM:
<project>
...
<distributionManagement>
<repository>
<id>internal</id>
<url>dav:http://repo.company.com/archiva/repository/internal/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>dav:http://repo.company.com/archiva/repository/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
Notice that we use the same id:s (internal and snapshots) when we
declare the repos in settings.xml and when we declare the
distributionManagement. This allows us to configure the authentication
for download/upload to the repo one time in the servers section of
settings.xml.
> Is this even possible? Will we have to roll our own maven 2
> installation (utilizing the conf/settings.xml to load repositories)?
This setup doesn't touch your Maven installation at all.
> Thanks again Wendy for putting up with my questioning, I'm really hoping
> Archiva will be the silver bullet I'm looking for.
>
> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 29, 2008 3:43 PM
> To: [email protected]
> Subject: Re: Choosing which repositories you install to
>
> On Thu, May 29, 2008 at 12:36 PM, EJ Ciramella
> <[EMAIL PROTECTED]> wrote:
>
>> So apparently, what's blocking is the lack of a user/pass combo.
>>
>> I have the guest account enabled, do I have to go through and add all
>> the server configuration (where I can supply this)?
>
> For deployment? Server credentials go in settings.xml, see
> http://maven.apache.org/ref/2.0.8/maven-settings/settings.html. Make
> sure the server id in settings.xml matches the repository id in
> distributionManagemnt.
>
> If you just want to test it you could give the guest account
> 'repository manager' permission.
>
> If you're not using Maven 2.0.9, you'll need wagon-webdav as a build
> extension, and the url looks like:
> dav:http://myserver.com/archiva/repository/internal .
>
--
Dennis Lundberg