You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brig Lamoreaux <Br...@apollogrp.edu> on 2010/01/26 23:01:41 UTC

Configure External Repository Credentials in POM

How can you set external repository credentials in the POM file?

I know that you can create a settings.xml file with values below, but how can I configure a POM file with username/password. I looked at http://maven.apache.org/maven-v4_0_0.xsd and I don't see a username and password.

<?xml version="1.0"?>
<settings>
    <profiles>
        <profile>
            <id>example.archiva</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>example.internal</id>
                    <name>Example's Repository</name>
                    <url>http://maven-secure.example.com/archiva/repository/example.internal</url>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <id>example.internal</id>
                    <name>example's Repository</name>
                    <url>http://maven-secure.example.com/archiva/repository/example.internal</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <servers>
         <server>
            <id>example.internal</id>
            <username>username</username>
            <password>p@s$w0Rd</password>
         </server>
      </servers>
</settings>

Brig Lamoreaux



This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.

Re: Configure External Repository Credentials in POM

Posted by Tomasz Pik <to...@gmail.com>.
On Tue, Jan 26, 2010 at 11:01 PM, Brig Lamoreaux
<Br...@apollogrp.edu> wrote:
>
> How can you set external repository credentials in the POM file?
>
> I know that you can create a settings.xml file with values below, but how can I configure a POM file with username/password. I looked at http://maven.apache.org/maven-v4_0_0.xsd and I don't see a username and password.

This is 'by design'. POM is a 'public artifcat' that you'd share with
your co-workers
(by default it's being packaged into jar file) so it should not
contains passwords.
settings.xml is in your home directory, so it's 'private'.

Regards,
Tomek

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org