* @param file
* @param filename
* @throws IOException
*/
private void deployPortlet(File file, String filename) throws IOException {
ServerDeploymentInterface deployer = SettingsBean.getInstance().getServerDeployer();
if (deployer.isAutoDeploySupported()) {
File target = new File(new File(deployer.getTargetServerDirectory(), deployer.getDeploymentBaseDir()), filename);
try {
FileUtils.copyFile(file, target);
} finally {
FileUtils.deleteQuietly(file);
}