View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001530 | SymmetricDS | Bug | public | 2014-01-14 14:35 | 2024-11-20 18:35 |
Reporter | boris_pavlovic | Assigned To | |||
Priority | high | ||||
Status | feedback | Resolution | open | ||
Product Version | 3.5.13 | ||||
Summary | 0001530: symadmin create-war doesn't put the symmetric-extension.xml under /WEB-INF/classes/conf | ||||
Description | therefore any added extensions enumerated in symmetric-extension.xml do not get loaded by spring at the application startup | ||||
Steps To Reproduce | create an extension, add it to the symmetric-extension.xml and verify that the extension is not loaded | ||||
Tags | symadmin | ||||
|
bug_fix_for_http___www_symmetricds_org_issues_view_php_id=1530.patch (1,722 bytes)
Index: symmetric-client/src/main/java/org/jumpmind/symmetric/SymmetricAdmin.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- symmetric-client/src/main/java/org/jumpmind/symmetric/SymmetricAdmin.java (revision 7859) +++ symmetric-client/src/main/java/org/jumpmind/symmetric/SymmetricAdmin.java (revision ) @@ -246,7 +246,7 @@ exportDefaultProperties(line, args); return true; } else if (cmd.equals(CMD_CREATE_WAR)) { - generateWar(line, args); + generateWar(args); return true; } else if (cmd.equals(CMD_EXPORT_SYM_TABLES)) { exportSymTables(line, args); @@ -383,12 +383,16 @@ } } - private void generateWar(CommandLine line, List<String> args) throws Exception { + private void generateWar(List<String> args) throws Exception { String warFileName = popArg(args, "Filename"); 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")); + FileUtils.moveFile( + new File(workingDirectory, "WEB-INF/classes/symmetric-extensions.xml"), + new File(workingDirectory, "WEB-INF/classes/conf/symmetric-extensions.xml") + ); if (propertiesFile != null && propertiesFile.exists()) { FileUtils.copyFile(propertiesFile, new File(workingDirectory, "WEB-INF/classes/symmetric.properties")); |
|
Here's the bug fix. |
|
The create war command is meant as a starting point to create a war file. The user usually has to add additional files like the JDBC driver. We may consider a future option for adding files to the war through command line option. There are 2 workarounds. 1. Set parameter extensions.xml with your spring xml and you put your code into the sym_extension table 2. Build a jar file following the structure outlined in the user guide. - https://symmetricds.sourceforge.net/doc/3.15/html/user-guide.html#_extension_points Let us know if you are interested in collaborating with us on this issue. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-01-14 14:35 | boris_pavlovic | New Issue | |
2014-01-17 08:52 | boris_pavlovic | File Added: bug_fix_for_http___www_symmetricds_org_issues_view_php_id=1530.patch | |
2014-01-17 08:52 | boris_pavlovic | Note Added: 0000423 | |
2019-04-22 14:24 | elong | Tag Attached: symadmin | |
2024-11-20 18:33 | mdrouard | Note Added: 0002531 | |
2024-11-20 18:35 | mdrouard | Status | new => feedback |