Author: jleroux
Date: Fri Mar 14 22:21:07 2014 New Revision: 1577745 URL: http://svn.apache.org/r1577745 Log: "Applied fix from trunk for revision: 1577744" ------------------------------------------------------------------------ r1577744 | jleroux | 2014-03-14 23:20:34 +0100 (ven. 14 mars 2014) | 3 lignes Fixes a bug introduced with r1574404 (forgot that shutdown and status historicaly have a prefixing dash), thanks to Youseek Khaye who spotted it and sent me a mail (the stop target was no longer working). I tested them only with a portoffset, my bad. While working on this I spotted another error introduced earlier with r1533839. Now, status and stop work again as before. ------------------------------------------------------------------------ Modified: ofbiz/branches/release13.07/ (props changed) ofbiz/branches/release13.07/build.xml ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java Propchange: ofbiz/branches/release13.07/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1577744 Modified: ofbiz/branches/release13.07/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/build.xml?rev=1577745&r1=1577744&r2=1577745&view=diff ============================================================================== --- ofbiz/branches/release13.07/build.xml (original) +++ ofbiz/branches/release13.07/build.xml Fri Mar 14 22:21:07 2014 @@ -423,7 +423,7 @@ under the License. <jvmarg value="${memory.initial.param}"/> <jvmarg value="${memory.max.param}"/> <jvmarg value="${memory.maxpermsize.param}"/> - <arg value="start-batch"/> + <arg value="start-batch"/> <arg value="-portoffset=${portoffset}"/> </java> </target> Modified: ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java?rev=1577745&r1=1577744&r2=1577745&view=diff ============================================================================== --- ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java (original) +++ ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java Fri Mar 14 22:21:07 2014 @@ -40,10 +40,6 @@ public class Config { if (command == null || command.trim().length() == 0) { command = "start"; } - // strip off the leading dash - if (command.startsWith("-")) { - command = command.substring(1); - } return "org/ofbiz/base/start/" + command + ".properties"; } @@ -53,8 +49,8 @@ public class Config { if ("start-batch".equalsIgnoreCase(firstArg) || "start-debug".equalsIgnoreCase(firstArg) || "stop".equalsIgnoreCase(firstArg) - || "shutdown".equalsIgnoreCase(firstArg) // shutdown & status hack (was pre-existing to portoffset introduction, also useful with it) - || "status".equalsIgnoreCase(firstArg)) { + || "-shutdown".equalsIgnoreCase(firstArg) // shutdown & status hack (was pre-existing to portoffset introduction, also useful with it) + || "-status".equalsIgnoreCase(firstArg)) { firstArg = "start"; } String configFileName = getConfigFileName(firstArg); @@ -356,14 +352,15 @@ public class Config { adminPort = Integer.parseInt(adminPortStr); if (args.length > 0) { for (String arg : args) { - if (arg.toLowerCase().contains("portoffset=")) { + if (arg.toLowerCase().contains("portoffset=") && !arg.toLowerCase().contains("${portoffset}")) { adminPort = adminPort != 0 ? adminPort : 10523; // This is necessary because the ASF machines don't allow ports 1 to 3, see INFRA-6790 adminPort += Integer.parseInt(arg.split("=")[1]); } } } } catch (Exception e) { - adminPort = 0; + System.out.println("Error while parsing admin port number (so default to 10523) = " + e); + adminPort = 10523; } // set the Derby system home |
Free forum by Nabble | Edit this page |