You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Spencer <pa...@mindspring.com> on 2004/07/09 17:54:56 UTC

Need different usernames for deploying artifacts, deploying site, and SCM

I am having a problem with maven.username.  The problem is that 
maven.username is used by the SCM plugin, via <developerConnection> in 
project.xml, and it is also used by the goal site:deploy.  In my case 
the username used by SCM must be different then the username used by 
site:deploy.  Thus I end up doing the following when rebuilding and 
deploying a project:

    maven -Dmaven.username=paul scm:update-project
    maven jar:deploy
    maven -Dmaven.username=webadmin site:deploy

In the event this can be resolved via configuration, I have included 
relevant section from my Maven configuration at the end of this posting.

If this can not be resolved via configuration, then I have the following 
suggestions:
1) Username property used by SCM:
    Define the property maven.scm.username that default to
    maven.username.  maven.scm.username should be used in the
    <developerConnection> tag in project.xml

2) Implement site:deploy similar to the artifact deploy in RC4.
    Specifically remove the tag <siteDirectory> from project.xml
    and replace it with maven.site properties, similar to the artifact
    properties.
        maven.site=scp://developer.foo.com
        maven.site.directory=/www/projects/${pom.artifactId}
        maven.site.username=foo-dev-docs
        maven.site.privatekey=/cygwin/home/paul/.ssh/id_rsa
        maven.site.passphrase=

3) Although I have not mention the distribution deploy goals, I would
    expect they would be consistent with the site deploy goals.


Maven configuration:
-------------------------------------------------------
***
* Configuration in project.xml
**
   <siteAddress>developer.foo.com</siteAddress>
   <siteDirectory>
     /www/projects/${pom.artifactId}
   </siteDirectory>
   <distributionAddress>developer.foo.com</distributionAddress>
   <distributionDirectory>
     /cygdrive/f/Maven-repository
   </distributionDirectory>
   <repository>
     <connection>
       scm:cvs:pserver:cvsanon@cvs.foo.com:/foo:${pom.artifactId}
     </connection>
    <developerConnection>
scm:cvs:pserver:${maven.username}@cvs.foo.com:/foo:${pom.artifactId}
    </developerConnection>
   </repository>


**
* Configuration in project.properties
**
maven.repo.remote=http://developer.foo.com/maven,http://www.ibiblio.org/maven
maven.repo.list=foo
maven.repo.foo=scp://developer.foo.com
maven.repo.foo.username=foo-dev-docs
maven.repo.foo.directory=/cygdrive/f/Maven-Repository

**
* Configuration in build.properties for a developer
**
maven.scp.executable=c:/cygwin/bin/scp
maven.ssh.executable=c:/cygwin/bin/ssh
maven.site.deploy.method=ssh

# Remote repository definitions
maven.repo.foo.privatekey=/cygwin/home/paul/.ssh/id_rsa
maven.repo.foo.passphrase=

-------------------------------------------------------

I would also like to say "Thank You" to the Maven developers.
Paul Spencer



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


Re: Need different usernames for deploying artifacts, deploying site, and SCM

Posted by Dion Gillard <di...@gmail.com>.
On Fri, 09 Jul 2004 11:54:56 -0400, Paul Spencer
<pa...@mindspring.com> wrote:
> I am having a problem with maven.username.  The problem is that
> maven.username is used by the SCM plugin, via <developerConnection> in
> project.xml, and it is also used by the goal site:deploy.  In my case
> the username used by SCM must be different then the username used by
> site:deploy.  Thus I end up doing the following when rebuilding and
> deploying a project:
> 
> 1) Username property used by SCM:
>     Define the property maven.scm.username that default to
>     maven.username.  maven.scm.username should be used in the
>     <developerConnection> tag in project.xml

Doesn't the SCM plugin just look at the developer connection?

My guess is that you could have defined the developer connection with
something other than maven.username.


-- 
http://www.multitask.com.au/people/dion/

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