diff --git a/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java b/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java index ca4123e6..ac441258 100644 --- a/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java +++ b/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java @@ -27,7 +27,7 @@ import org.apache.maven.project.Project; * Perform mapping between project's properties and attributes of DeployRequest class. * * @author Michal Maczka - * @version $Id: RepositoryInfoBuilder.java,v 1.6 2004/06/25 18:50:38 brett Exp $ + * @version $Id: RepositoryInfoBuilder.java,v 1.7 2004/07/06 13:42:25 brett Exp $ */ public class RepositoryInfoBuilder { @@ -94,6 +94,23 @@ public class RepositoryInfoBuilder 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 @@ public class RepositoryInfoBuilder 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)) diff --git a/artifact/src/main/org/apache/maven/deploy/DeployTool.java b/artifact/src/main/org/apache/maven/deploy/DeployTool.java index 3a9073ee..31c7851d 100644 --- a/artifact/src/main/org/apache/maven/deploy/DeployTool.java +++ b/artifact/src/main/org/apache/maven/deploy/DeployTool.java @@ -29,6 +29,7 @@ import org.apache.maven.deploy.deployers.FtpDeployer; 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; @@ -37,7 +38,7 @@ import org.apache.maven.deploy.exceptions.UnsupportedProtocolException; * Utility class * * @author Michal Maczka - * @version $Id: DeployTool.java,v 1.12 2004/06/25 13:50:05 brett Exp $ + * @version $Id: DeployTool.java,v 1.13 2004/07/06 13:42:25 brett Exp $ */ public class DeployTool { @@ -88,6 +89,10 @@ public class DeployTool { deployer = new ExternalDeployer(); } + if (url.startsWith(ScpExeDeployer.PROTOCOL)) + { + deployer = new ScpExeDeployer(); + } if (deployer == null) { throw new UnsupportedProtocolException(url); diff --git a/artifact/src/main/org/apache/maven/deploy/RepositoryInfo.java b/artifact/src/main/org/apache/maven/deploy/RepositoryInfo.java index 3a30ba17..7a3c7114 100644 --- a/artifact/src/main/org/apache/maven/deploy/RepositoryInfo.java +++ b/artifact/src/main/org/apache/maven/deploy/RepositoryInfo.java @@ -23,7 +23,7 @@ package org.apache.maven.deploy; * perform a deployment. * * @author Michal Maczka - * @version $Id: RepositoryInfo.java,v 1.5 2004/06/25 18:50:38 brett Exp $ + * @version $Id: RepositoryInfo.java,v 1.6 2004/07/06 13:42:25 brett Exp $ */ public class RepositoryInfo { @@ -82,6 +82,12 @@ public class RepositoryInfo /** 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 @@ public class RepositoryInfo 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; + } } diff --git a/artifact/xdocs/changes.xml b/artifact/xdocs/changes.xml index 4752c7f5..08a2af0b 100644 --- a/artifact/xdocs/changes.xml +++ b/artifact/xdocs/changes.xml @@ -26,6 +26,7 @@
| maven.repo.x.scp.executable | +Yes | +
+ Specifies the name (and possibly location) of the remote secure
+ copy executable to use (SCP).
+ The default value is maven.scp.executable.
+ |
+
| maven.repo.x.scp.args | +Yes | ++ Specifies optional parameters that are passed to the scp executable. + | +
| maven.repo.x.ssh.executable | +Yes | +
+ Specifies the name (and possibly location) of the remote secure
+ shell executable to use (SSH).
+ The default value is maven.ssh.executable.
+ |
+
| maven.repo.x.ssh.args | +Yes | ++ Specifies optional parameters that are passed to the ssh executable. + | +
If you are behind firewall and need to use proxy server see diff --git a/artifact/xdocs/protocols.xml b/artifact/xdocs/protocols.xml index c12b8749..5b11d5d7 100644 --- a/artifact/xdocs/protocols.xml +++ b/artifact/xdocs/protocols.xml @@ -88,6 +88,20 @@