That asf example is perfect - and you've perfectly summarized my needs. 1 - settings.xml should have one repository configured (archiva) 2 - poms should have the snapshot and release repos defined.
Thank you!! -----Original Message----- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2008 2:33 PM To: [email protected] Subject: Re: Choosing which repositories you install to On Thu, May 29, 2008 at 10:35 AM, EJ Ciramella <[EMAIL PROTECTED]> wrote: > One of the goals of using archiva is to simplify what repositories > people have configured in their settings.xml, ideally, they'd only be > pointing at archiva. > > The question is, if this is the case (a single entry), and we have a > snapshot repository, how do you properly do a mvn deploy:deploy and have > a snapshot go into the snapshot repository and an official release go > into the release repository? Repositories that you retrieve artifacts from are different from repositories that you publish to. The former are configured in <repositories> and <pluginRepositories> usually in settings.xml, while the latter are inside <distributionManagement> which is in the pom. You can see an example of distributionManagement in the ASF organization-level pom: http://svn.apache.org/repos/asf/maven/pom/trunk/asf/pom.xml When you deploy, Maven will automatically choose between the distribution 'repository' or 'snapshotRepository' based on whether the version number ends in -SNAPSHOT. (You can try this out by adding distributionManagement to a sample project and deploying to file:///tmp/releases vs. file:///tmp/snapshots by changing the version number.) -- Wendy
