Upgrade to FTPServer 1.0 GA
---------------------------
Key: CAMEL-1307
URL: https://issues.apache.org/activemq/browse/CAMEL-1307
Project: Apache Camel
Issue Type: Task
Components: camel-ftp
Reporter: Claus Ibsen
Priority: Minor
Fix For: 2.0.0, 1.5.2
We use FTP Server from Apache Mina to unit test camel-ftp itself.
Upgrading to RC2 is complex as the API changed too much and the setPort method
is inaccessible
Created a ticket about it
https://issues.apache.org/jira/browse/FTPSERVER-271
The code below is the partiual upgrade, until hitting the setPort issue.
{code}
protected void initFtpServer() throws Exception {
ftpServerContext = new DefaultFtpServerContext();
// setup user management to read our users.properties and use clear
text passwords
File file = new
File("./src/test/resources/users.properties").getAbsoluteFile();
PropertiesUserManager uman = new PropertiesUserManager(new
ClearTextPasswordEncryptor(), file, "admin");
ftpServerContext.setUserManager(uman);
ftpServer = new DefaultFtpServer(ftpServerContext);
if (port < 21000) {
throw new IllegalArgumentException("Port number is not initialized
in an expected range: " + getPort());
}
ftpServer.getListener("default").setPort(port);
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.