brett       2004/07/06 06:42:25

  Modified:    artifact/src/main/org/apache/maven/artifact/deployer
                        RepositoryInfoBuilder.java
               artifact/src/main/org/apache/maven/deploy DeployTool.java
                        RepositoryInfo.java
               artifact/xdocs changes.xml properties.xml protocols.xml
  Log:
  PR: MPARTIFACT-22
  add scpexe protocol - uses external scp executable
  
  Revision  Changes    Path
  1.7       +22 -1     
maven-plugins/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java
  
  Index: RepositoryInfoBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RepositoryInfoBuilder.java        25 Jun 2004 18:50:38 -0000      1.6
  +++ RepositoryInfoBuilder.java        6 Jul 2004 13:42:25 -0000       1.7
  @@ -94,6 +94,23 @@
   
           String proxyPort = (String) project.getContext().getProxyPort();
   
  +        String scpExe = (String) project.getContext().getVariable("maven.repo." + 
repository + ".scp.executable");
  +        if (scpExe == null) {
  +            scpExe = (String) 
project.getContext().getVariable("maven.scp.executable");
  +        }
  +        String scpArgs = (String) project.getContext().getVariable("maven.repo." + 
repository + ".scp.args");
  +        if (scpArgs == null) {
  +             scpArgs = (String) project.getContext().getVariable("maven.scp.args");
  +        }
  +        String sshExe = (String) project.getContext().getVariable("maven.repo." + 
repository + ".ssh.executable");
  +        if (sshExe == null) {
  +             sshExe = (String) 
project.getContext().getVariable("maven.ssh.executable");
  +        }
  +        String sshArgs = (String) project.getContext().getVariable("maven.repo." + 
repository + ".ssh.args");
  +        if (sshArgs == null) {
  +             sshArgs = (String) project.getContext().getVariable("maven.ssh.args");
  +        }
  +        
           if (username == null) {
               username = (String) project.getContext().getVariable("maven.username");
           }
  @@ -107,6 +124,10 @@
           repoInfo.setProxyHost(proxyHost);
           repoInfo.setProxyUserName(proxyUser);
           repoInfo.setProxyPassword(proxyPassword);
  +        repoInfo.setScpExe(scpExe);
  +        repoInfo.setScpArgs(scpArgs);
  +        repoInfo.setSshExe(sshExe);
  +        repoInfo.setSshArgs(sshArgs);
           if (passiveModeOn != null)
           {
               if ("false".equalsIgnoreCase(passiveModeOn))
  
  
  
  1.13      +6 -1      
maven-plugins/artifact/src/main/org/apache/maven/deploy/DeployTool.java
  
  Index: DeployTool.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/DeployTool.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DeployTool.java   25 Jun 2004 13:50:05 -0000      1.12
  +++ DeployTool.java   6 Jul 2004 13:42:25 -0000       1.13
  @@ -29,6 +29,7 @@
   import org.apache.maven.deploy.deployers.HttpDeployer;
   import org.apache.maven.deploy.deployers.SFtpDeployer;
   import org.apache.maven.deploy.deployers.ScpDeployer;
  +import org.apache.maven.deploy.deployers.ScpExeDeployer;
   import org.apache.maven.deploy.exceptions.AuthenticationException;
   import org.apache.maven.deploy.exceptions.TransferFailedException;
   import org.apache.maven.deploy.exceptions.UnsupportedProtocolException;
  @@ -87,6 +88,10 @@
           if (url.startsWith(ExternalDeployer.PROTOCOL))
           {
               deployer = new ExternalDeployer();
  +        }
  +        if (url.startsWith(ScpExeDeployer.PROTOCOL))
  +        {
  +             deployer = new ScpExeDeployer();
           }
           if (deployer == null)
           {
  
  
  
  1.6       +31 -1     
maven-plugins/artifact/src/main/org/apache/maven/deploy/RepositoryInfo.java
  
  Index: RepositoryInfo.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/RepositoryInfo.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RepositoryInfo.java       25 Jun 2004 18:50:38 -0000      1.5
  +++ RepositoryInfo.java       6 Jul 2004 13:42:25 -0000       1.6
  @@ -82,6 +82,12 @@
       /** compress */
       private boolean compress;
       
  +    /** parms for ScpExeDeployer */
  +    private String sshExe;
  +    private String sshArgs;
  +    private String scpExe;
  +    private String scpArgs;
  +    
       /**
        * @param compress
        */
  @@ -383,4 +389,28 @@
           this.passiveModeOn = passiveModeOn;
       }
   
  +     public String getScpArgs() {
  +             return scpArgs;
  +     }
  +     public void setScpArgs(String scpArgs) {
  +             this.scpArgs = scpArgs;
  +     }
  +     public String getScpExe() {
  +             return scpExe;
  +     }
  +     public void setScpExe(String scpExe) {
  +             this.scpExe = scpExe;
  +     }
  +     public String getSshArgs() {
  +             return sshArgs;
  +     }
  +     public void setSshArgs(String sshArgs) {
  +             this.sshArgs = sshArgs;
  +     }
  +     public String getSshExe() {
  +             return sshExe;
  +     }
  +     public void setSshExe(String sshExe) {
  +             this.sshExe = sshExe;
  +     }
   }
  
  
  
  1.27      +1 -0      maven-plugins/artifact/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/xdocs/changes.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- changes.xml       6 Jul 2004 12:37:17 -0000       1.26
  +++ changes.xml       6 Jul 2004 13:42:25 -0000       1.27
  @@ -26,6 +26,7 @@
     </properties>
     <body>
       <release version="1.4-SNAPSHOT" date="in CVS">
  +      <action dev="brett" type="add" issue="MPARTIFACT-22" due-to="Leif Nelson">Add 
an scp executable deployer</action>
         <action dev="brett" type="update">Deprecated the artifact:load hook 
goal</action>
         <action dev="brett" type="add">Allow use of distributionSite POM attribute in 
artifact method</action>
         <action dev="brett" type="update">Update dependencies on commons-*</action>
  
  
  
  1.9       +38 -0     maven-plugins/artifact/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/xdocs/properties.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- properties.xml    14 Jun 2004 13:36:48 -0000      1.8
  +++ properties.xml    6 Jul 2004 13:42:25 -0000       1.9
  @@ -130,6 +130,44 @@
           </tr>
         </table>
       </section>
  +    <section name="Protocol-specific Properties">
  +      <subsection name="scpexe">
  +        <table>
  +          <tr>
  +            <td>maven.repo.x.scp.executable</td>
  +            <td>Yes</td>
  +            <td>
  +              Specifies the name (and possibly location) of the remote secure
  +              copy executable to use (SCP).
  +              The default value is <code>maven.scp.executable</code>.
  +            </td>
  +          </tr>
  +           <tr>
  +            <td>maven.repo.x.scp.args</td>
  +            <td>Yes</td>
  +            <td>
  +              Specifies optional parameters that are passed to the scp executable.
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>maven.repo.x.ssh.executable</td>
  +            <td>Yes</td>
  +            <td>
  +              Specifies the name (and possibly location) of the remote secure
  +              shell executable to use (SSH).
  +              The default value is <code>maven.ssh.executable</code>.
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>maven.repo.x.ssh.args</td>
  +            <td>Yes</td>
  +            <td>
  +              Specifies optional parameters that are passed to the ssh executable.
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +    </section>
       <section name="Other properties used">
        <p>
          If you are behind firewall and need to use proxy server see
  
  
  
  1.4       +14 -0     maven-plugins/artifact/xdocs/protocols.xml
  
  Index: protocols.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/artifact/xdocs/protocols.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- protocols.xml     4 Mar 2004 17:59:38 -0000       1.3
  +++ protocols.xml     6 Jul 2004 13:42:25 -0000       1.4
  @@ -88,6 +88,20 @@
             <td>Not supported</td>
             <td>Not supported</td>        
           </tr>            
  +        <tr>
  +          <td>
  +            <b>SCP Executable</b>
  +            (External Secure Copy)
  +          </td>
  +          <td>scpexe://</td>
  +          <td>Mandatory</td>
  +          <td>Mandatory</td>
  +          <td>Mandatory if private key unless private key is provided</td>
  +          <td>Optional</td>
  +          <td>Optional</td>
  +          <td>Optional</td>
  +          <td>Optional (default is 22)</td>        
  +        </tr> 
         </table>
       </section>
     </body>
  
  
  

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

Reply via email to