Hi Fred,

i definded a profile in my personal settings.xml

<profiles>
        <profile>
                <id>scmProfile</id>
                <properties>
                        <scm.username>userid</scm.username>
                        <scm.password>password</scm.password>
                </properties>
        </profile>
</profiles> 

<activeProfiles>
    <activeProfile>scmProfile</activeProfile>
</activeProfiles>

And in the Super-POM (e.g. company POM) i defined the scm plugin like
this:

<pluginManagement>
        <plugins>
                <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
        
<artifactId>maven-scm-plugin</artifactId>
                                <configuration>
        
<connectionType>connection</connectionType>
        
<workingDirectory>/checkout</workingDirectory>
        
<checkoutDirectory>/checkout</checkoutDirectory>
        
<username>${scm.username}</username>
        
<password>${scm.password}</password>
                                </configuration>
                        </plugin>
                        <plugin>
        
<groupId>org.apache.maven.plugins</groupId>
        
<artifactId>maven-scm-plugin</artifactId>
                                <configuration>
        
<connectionType>developerconnection</connectionType>
        
<workingDirectory>/checkout</workingDirectory>
        
<checkoutDirectory>/checkout</checkoutDirectory>
        
<username>${scm.username}</username>
        
<password>${scm.password}</password>
                                </configuration>
                        </plugin>
        </plugins>
</pluginManagement>

I hope this was a help

brgds 

Dominqiue

-----Original Message-----
From: Fred Zhang [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 14, 2007 10:11 AM
To: Maven Users List
Subject: how to set subversion authentication information into
settings.xml (instead of writing it into project pom)

Hi there,
I'm working on configuring maven-scm plugin to use maven to do daily
update/commit jobs.

A problem is that I don't want to write my authentication information
(username/password) into the project pom file (otherwise it will be
shared through subversion). Neither want I use subversion "cached
password" mechanism. I found some web-pages said that the svn repository
server information (with username/password) could be written in
settings.xml as following:
<servers>
       <server>
              <id>http://svnrepo.my.com/svn/project/trunk</id>
              <username>username</username>
              <password>password</password>
       </server>
</servers>
And in project pom, just write
       <scm>
 
<connection>scm:svn:http://svnrepo.my.com/svn/project/trunk</connection>
           <url>http://svnrepo.my.com/svn/project/trunk</url>
       </scm>

Then the mvn scm:update should work.

I tried. But I still got authentication failure.

Is there any way to make it?

Thanks in advance.

Fred

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to