PR: MPARTIFACT-8

Submitted By:	Matt Smith
Review By:	Brett Porter
allow non-passive FTP


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett
2004-06-25 18:50:38 +00:00
parent 9db573f235
commit 6a3c53eff2
4 changed files with 38 additions and 7 deletions

View File

@@ -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.5 2004/06/25 18:19:35 brett Exp $
* @version $Id: RepositoryInfoBuilder.java,v 1.6 2004/06/25 18:50:38 brett Exp $
*/
public class RepositoryInfoBuilder
{
@@ -82,6 +82,10 @@ public class RepositoryInfoBuilder
String remoteGroup =
(String) project.getContext().getVariable(
"maven.repo." + repository + ".group");
String passiveModeOn =
(String) project.getContext().getVariable(
"maven.repo." + repository + ".passiveModeOn");
String proxyHost = (String) project.getContext().getProxyHost();
String proxyUser = (String) project.getContext().getProxyUserName();
@@ -103,6 +107,13 @@ public class RepositoryInfoBuilder
repoInfo.setProxyHost(proxyHost);
repoInfo.setProxyUserName(proxyUser);
repoInfo.setProxyPassword(proxyPassword);
if (passiveModeOn != null)
{
if ("false".equalsIgnoreCase(passiveModeOn))
{
repoInfo.setPassiveModeOn(false);
}
}
if (compress != null)
{
try

View File

@@ -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.4 2004/05/12 12:33:55 evenisse Exp $
* @version $Id: RepositoryInfo.java,v 1.5 2004/06/25 18:50:38 brett Exp $
*/
public class RepositoryInfo
{
@@ -33,6 +33,12 @@ public class RepositoryInfo
/** The nickname (alias) of the repository*/
private String repositoryAlias;
/** Indicates if Passive Mode should be used.
* Use passive mode as default because most of us are
* behind firewalls these days.
*/
private boolean passiveModeOn = true;
/** URL of the remote host*/
private String url;
@@ -366,5 +372,15 @@ public class RepositoryInfo
{
this.debugOn = debugOn;
}
public boolean isPassiveModeOn()
{
return passiveModeOn;
}
public void setPassiveModeOn(boolean passiveModeOn)
{
this.passiveModeOn = passiveModeOn;
}
}

View File

@@ -42,7 +42,7 @@ import org.apache.maven.deploy.exceptions.TransferFailedException;
*
* @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
* @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id: FtpDeployer.java,v 1.11 2004/06/25 13:50:05 brett Exp $
* @version $Id: FtpDeployer.java,v 1.12 2004/06/25 18:50:38 brett Exp $
*
* @todo review exception handling
* @todo don't spool to System.out
@@ -124,9 +124,12 @@ public class FtpDeployer extends AbstractDeployer
// Set to binary mode.
ftp.setFileType(FTP.BINARY_FILE_TYPE);
// Use passive mode as default because most of us are
// behind firewalls these days.
ftp.enterLocalPassiveMode();
if(repoInfo.isPassiveModeOn())
{
ftp.enterLocalPassiveMode();
}
ftp.changeWorkingDirectory(repoInfo.getBasedir());
}

View File

@@ -26,7 +26,8 @@
</properties>
<body>
<release version="1.3" date="In CVS">
<action dev="brett" type="add" issue="MPARTIFACT-20">Fix opy-deps when list is empty</action>
<action dev="brett" type="add" issue="MPARTIFACT-8" due-to="Matt Smith">Allow non-passive FTP</action>
<action dev="brett" type="add" issue="MPARTIFACT-20">Fix copy-deps when list is empty</action>
<action dev="brett" type="add">Accept empty passphrase to ssh based deployers</action>
<action dev="brett" type="add">Default to maven.username if repository username not given</action>
<action dev="brett" type="add">Add typeHandler parameter to tags to specify a custom handler</action>