I don't think the original poster was questioning whether or not artifacts 
should be downloaded from repos defined in settings.xml. But rather artifacts 
that get deployed do not go in settings.xml. They have to go in the pom. Why do 
these repos not also go in settings.xml?

I agree with the OP that this is a bit confusing.

> -----Original Message-----
> From: Jason van Zyl [mailto:ja...@sonatype.com] 
> Sent: Monday, May 03, 2010 11:27 AM
> To: Maven Users List
> Subject: Re: Why define repositories in settings.xml and pom?
> 
> http://www.sonatype.com/people/2009/02/why-putting-repositorie
> s-in-your-poms-is-a-bad-idea/
> 
> On May 3, 2010, at 4:35 PM, Timothy Mcginnis wrote:
> 
> > I am a confused about where repositories need to be defined.
> > 
> > I have my repositories defined in my settings.xml file under my 
> > default profile.
> > 
> > <profile>
> >        <id>default_profile</id>
> >        <activation>
> >                <activeByDefault>true</activeByDefault>
> >        </activation>
> >        <repositories>
> >                <repository>
> >                        <id>archiva.internal</id>
> >                        <name>Internal Release Repository</name>
> >                        <url>
> > 
> http://2e02057b.aessuccess.org:8085/archiva/repository/internal/</url>
> >                        <snapshots>
> >                                <enabled>false</enabled>
> >                        </snapshots>
> >                        <releases>
> >                                <enabled>true</enabled>
> >                        </releases>
> >                </repository>
> >                <repository>
> >                        <id>archiva.snapshots</id>
> >                        <name>Internal Snapshot Repository</name>
> >                        <url>
> > 
> http://2e02057b.aessuccess.org:8085/archiva/repository/snapsho
> ts/</url>
> >                        <snapshots>
> >                                <enabled>true</enabled>
> >                        </snapshots>
> >                        <releases>
> >                                <enabled>false</enabled>
> >                        </releases>
> >                </repository>
> >        </repositories>
> > </profile>
> > 
> > I thought this would tell Maven where to store and retrieve all my 
> > artifacts.  But when I run a deploy it gives me the error
> > 
> > Deployment failed: repository element was not specified in the pom 
> > inside distributionManagement element or in 
> > -DaltDeploymentRepository=id::layout::url parameter
> > 
> > If I define the repositories in the pom using the 
> > distributionManagement element it works fine.
> > 
> > But this seems confusing to me.  Why do I have to define 
> them in both 
> > places?
> > 
> > Tim McGinnis
> > 717 720-1962
> > Web Development
> > AES/PHEAA
> > 
> ======================================================================
> > ======== This message contains privileged and confidential 
> information 
> > intended for the above addressees only.  If you receive 
> this message 
> > in error please delete or destroy this message and/or attachments.
> > 
> > The sender of this message will fully cooperate in the civil and 
> > criminal prosecution of any individual engaging in the 
> unauthorized use of this message.
> > 
> ======================================================================
> > ========
> 
> Thanks,
> 
> Jason
> 
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> ---------------------------------------------------------
> 
> 
> 
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to