Skip to content

Commit

Permalink
0000672: Support a --engine option for the syadmin create-war command
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Jun 27, 2012
1 parent f473382 commit e9c828c
Showing 1 changed file with 3 additions and 7 deletions.
Expand Up @@ -404,18 +404,14 @@ private void syncTrigger(CommandLine line, List<String> args) throws IOException

private void generateWar(CommandLine line, List<String> args) throws Exception {
String warFileName = popArg(args, "Filename");
String propertiesFileName = line.getOptionValue(OPTION_PROPERTIES_FILE);
final File workingDirectory = new File("../.war");
FileUtils.deleteDirectory(workingDirectory);
FileUtils.copyDirectory(new File("../web"), workingDirectory);
FileUtils.copyDirectory(new File("../conf"), new File(workingDirectory,
"WEB-INF/classes"));
if (propertiesFileName != null) {
File propsFile = new File(propertiesFileName);
if (propsFile.exists()) {
FileUtils.copyFile(propsFile, new File(workingDirectory,
"WEB-INF/classes/symmetric.properties"));
}
if (propertiesFile != null && propertiesFile.exists()) {
FileUtils.copyFile(propertiesFile, new File(workingDirectory,
"WEB-INF/classes/symmetric.properties"));
}
JarBuilder builder = new JarBuilder(workingDirectory, new File(
warFileName), new File[] { workingDirectory });
Expand Down

0 comments on commit e9c828c

Please sign in to comment.