Commit 020cee9b authored by frederic motte's avatar frederic motte
Browse files

modify the generation directory

parent a2a73f52
......@@ -175,7 +175,7 @@ public class SFGeneratorImpl implements SFGenerator {
String destDir = FileUtils.getTempDirectoryPath();
String initialDestDir = destDir;
destDir = Utilities.getDestinationFolderPath(destDir);
destDir = Utilities.getDestinationFolderPath(destDir, sfName);
Utilities.deleteProjectFolder(destDir);
File warResultFile = Utilities.copyWarTemplate(destDir);
File configurationFile = generateConfigurationFile(sfName, destDir, securityModel, groups, account, SFType.ADAPTATION, domain, STSUrl);
......@@ -204,10 +204,14 @@ public class SFGeneratorImpl implements SFGenerator {
SF sf = new SF(sfName);
try {
String destDir = FileUtils.getTempDirectoryPath();
System.out.println("destdir " + destDir);
String initialDestDir = destDir;
destDir = Utilities.getDestinationFolderPath(destDir);
destDir = Utilities.getDestinationFolderPath(destDir, sfName);
System.out.println("destdir " + destDir);
Utilities.deleteProjectFolder(destDir);
System.out.println("destdir " + destDir);
File warResultFile = Utilities.copyWarTemplate(destDir);
System.out.println("destdir " + destDir);
File configurationFile = generateConfigurationFile(sfName, destDir, null, groups, null, SFType.PROTECTION, domain, STSUrl);
Utilities.addConfigFileintoWar(destDir, configurationFile);
File webXml = Utilities.createWebXml(destDir, sf.getName(), STSUrl);
......
......@@ -71,10 +71,11 @@ public class Utilities {
/**
* generate the desination folder
* @param destDir
* @param sfName
* @return
*/
public static String getDestinationFolderPath(String destDir){
return (destDir+File.separatorChar+System.currentTimeMillis()).replaceAll("\\s", "_");
public static String getDestinationFolderPath(String destDir, String sfName){
return (destDir+File.separatorChar+"sf"+sfName.replaceAll(" ", "")+"-"+System.currentTimeMillis()).replaceAll("\\s", "_");
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment