http://www.sonatype.com/people/2009/02/why-putting-repositories-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/snapshots/</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
---------------------------------------------------------




Reply via email to