Description
We use Apache FTP Server embedded in an application (to allow some devices to download firmware updates).
We would like this application let less files as possible on the user computer. Or at least, only files whose names are prefixed by the application name.
The current version of our application uses an old code base of Apache FTP Server. Through a properties-based configuration, it sets "config.user-manager.prop-file" and "config.ip-restrictor.file" properties to use appropriate file names, in the current directory rather than in "./res".
With this configuration, we create a ConfigurableFtpServerContext object, then the FtpServer object.
And it works well.
For a future version of our application, we would like to keep synchronized on Apache FTP Server trunk (at least until 1.0 version ).
So I wrote a Spring configuration file to get the same behavior:
<file-user-manager file="./EquipmentSetup-ftp-users.properties" encrypt-passwords="true" />
The problem is that the configure() and createDefaultUsers() of the PropertiesUserManager object are called (by DefaultFtpServerContext constructor) before Spring sets the "file" value, so the "res" directory is still created, with a "user.gen" file whose content is irrelevant for our application.
Thus, I would like to know if there is a way, using Spring, to bypass this behavior.
Just in case, I tried to use a <user-manager><beans:bean class="org.apache.ftpserver.usermanager.PropertiesUserManager"/></user-manager> instead of <file-user-manager/>, but with the same result...