PR: MPARTIFACT-22

add scpexe protocol - uses external scp executable


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2004-07-06 13:42:25 +00:00
1 parent b5f0b13758
commit 0e59327ad9
6 files changed
+112 -3

No files matched your search

@@ -27,7 +27,7 @@ import org.apache.maven.project.Project;
* Perform mapping between project's properties and attributes of DeployRequest class.
*
* @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @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))
@@ -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 <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @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);
@@ -23,7 +23,7 @@ package org.apache.maven.deploy;
* perform a deployment.
*
* @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @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;
}
}
+1
View File
@@ -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>
+38
View File
@@ -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
+14
View File
@@ -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>