brett 2004/06/25 11:50:38 Modified: artifact/src/main/org/apache/maven/artifact/deployer RepositoryInfoBuilder.java artifact/src/main/org/apache/maven/deploy RepositoryInfo.java artifact/src/main/org/apache/maven/deploy/deployers FtpDeployer.java artifact/xdocs changes.xml Log: PR: MPARTIFACT-8 Submitted By: Matt Smith Review By: Brett Porter allow non-passive FTP Revision Changes Path 1.6 +12 -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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RepositoryInfoBuilder.java 25 Jun 2004 18:19:35 -0000 1.5 +++ RepositoryInfoBuilder.java 25 Jun 2004 18:50:38 -0000 1.6 @@ -82,6 +82,10 @@ 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 @@ repoInfo.setProxyHost(proxyHost); repoInfo.setProxyUserName(proxyUser); repoInfo.setProxyPassword(proxyPassword); + if (passiveModeOn != null) + { + if ("false".equalsIgnoreCase(passiveModeOn)) + { + repoInfo.setPassiveModeOn(false); + } + } if (compress != null) { try 1.5 +17 -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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RepositoryInfo.java 12 May 2004 12:33:55 -0000 1.4 +++ RepositoryInfo.java 25 Jun 2004 18:50:38 -0000 1.5 @@ -33,6 +33,12 @@ /** 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; @@ -365,6 +371,16 @@ public void setDebugOn(boolean debugOn) { this.debugOn = debugOn; + } + + public boolean isPassiveModeOn() + { + return passiveModeOn; + } + + public void setPassiveModeOn(boolean passiveModeOn) + { + this.passiveModeOn = passiveModeOn; } } 1.12 +7 -4 maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/FtpDeployer.java Index: FtpDeployer.java =================================================================== RCS file: /home/cvs/maven-plugins/artifact/src/main/org/apache/maven/deploy/deployers/FtpDeployer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- FtpDeployer.java 25 Jun 2004 13:50:05 -0000 1.11 +++ FtpDeployer.java 25 Jun 2004 18:50:38 -0000 1.12 @@ -124,9 +124,12 @@ // 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()); } 1.20 +2 -1 maven-plugins/artifact/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven-plugins/artifact/xdocs/changes.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- changes.xml 25 Jun 2004 18:37:27 -0000 1.19 +++ changes.xml 25 Jun 2004 18:50:38 -0000 1.20 @@ -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>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]