maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r381076 - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProviderRepositoryWithHost.java maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java
Date Sun, 26 Feb 2006 11:00:16 GMT
Author: evenisse
Date: Sun Feb 26 03:00:13 2006
New Revision: 381076

URL: http://svn.apache.org/viewcvs?rev=381076&view=rev
Log:
Add privateKey and passphrase in ScmProviderRepositoryWithHost require by java svn provider.

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProviderRepositoryWithHost.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProviderRepositoryWithHost.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProviderRepositoryWithHost.java?rev=381076&r1=381075&r2=381076&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProviderRepositoryWithHost.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProviderRepositoryWithHost.java
Sun Feb 26 03:00:13 2006
@@ -27,6 +27,10 @@
 
     private int port;
 
+    private String privateKey;
+
+    private String passphrase;
+
     public String getHost()
     {
         return host;
@@ -45,5 +49,25 @@
     public void setPort( int port )
     {
         this.port = port;
+    }
+
+    public String getPrivateKey()
+    {
+        return privateKey;
+    }
+
+    public void setPrivateKey( String privateKey )
+    {
+        this.privateKey = privateKey;
+    }
+
+    public String getPassphrase()
+    {
+        return passphrase;
+    }
+
+    public void setPassphrase( String passphrase )
+    {
+        this.passphrase = passphrase;
     }
 }

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java?rev=381076&r1=381075&r2=381076&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java
Sun Feb 26 03:00:13 2006
@@ -69,7 +69,21 @@
     private String password;
 
     /**
-     * The url of tags base directory (used by svn protocol).
+     * The private key (used by java svn).
+     *
+     * @parameter expression="${privateKey}"
+     */
+    private String privateKey;
+
+    /**
+     * The passphrase (used by java svn).
+     *
+     * @parameter expression="${passphrase}"
+     */
+    private String passphrase;
+
+    /**
+     * The url of tags base directory (used by svn protocol). Not necessary to set it if
you use standard svn layout (branches/tags/trunk).
      *
      * @parameter expression="${tagBase}"
      */
@@ -173,7 +187,7 @@
             {
                 ScmProviderRepositoryWithHost repo = (ScmProviderRepositoryWithHost) repository.getProviderRepository();
 
-                loadUserNamePasswordFromSettings( repo );
+                loadInfosFromSettings( repo );
 
                 if ( !StringUtils.isEmpty( username ) )
                 {
@@ -184,6 +198,16 @@
                 {
                     repo.setPassword( password );
                 }
+
+                if ( !StringUtils.isEmpty( privateKey ) )
+                {
+                    repo.setPrivateKey( privateKey );
+                }
+
+                if ( !StringUtils.isEmpty( passphrase ) )
+                {
+                    repo.setPassphrase( passphrase );
+                }
             }
 
             if ( !StringUtils.isEmpty( tagBase ) && repository.getProvider().equals(
"svn" ) )
@@ -206,7 +230,7 @@
      *
      * @param repo
      */
-    private void loadUserNamePasswordFromSettings( ScmProviderRepositoryWithHost repo )
+    private void loadInfosFromSettings( ScmProviderRepositoryWithHost repo )
     {
         if ( username == null || password == null )
         {
@@ -231,6 +255,16 @@
                 if ( password == null )
                 {
                     password = this.settings.getServer( host ).getPassword();
+                }
+
+                if ( privateKey == null )
+                {
+                    privateKey = this.settings.getServer( host ).getPrivateKey();
+                }
+
+                if ( passphrase == null )
+                {
+                    passphrase = this.settings.getServer( host ).getPassphrase();
                 }
             }
         }



Mime
View raw message