You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/03/05 10:46:48 UTC

svn commit: r1574405 - in /ofbiz/branches/release13.07: ./ build.xml framework/start/src/org/ofbiz/base/start/Config.java

Author: jleroux
Date: Wed Mar  5 09:46:48 2014
New Revision: 1574405

URL: http://svn.apache.org/r1574405
Log:
"Applied fix from trunk for revision: 1574404" 
------------------------------------------------------------------------
r1574404 | jleroux | 2014-03-05 10:46:26 +0100 (mer. 05 mars 2014) | 3 lignes

Completes descriptions of ant targets which have portoffset parameter
Completes code in Config.java for start-debug only (adds "start-debug" to pick start.properties when portoffset is used). 
The rest of the changes is only refactoring to have the replacement to pick start.properties only in getInstance()
------------------------------------------------------------------------


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:r1574404

Modified: ofbiz/branches/release13.07/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/build.xml?rev=1574405&r1=1574404&r2=1574405&view=diff
==============================================================================
--- ofbiz/branches/release13.07/build.xml (original)
+++ ofbiz/branches/release13.07/build.xml Wed Mar  5 09:46:48 2014
@@ -418,7 +418,7 @@ under the License.
         </java>
     </target>
     <target name="start-batch"
-            description="Start OFBiz as a separate process">
+            description="Start OFBiz as a separate process. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
         <java jar="ofbiz.jar" fork="true" spawn="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
@@ -428,7 +428,7 @@ under the License.
         </java>
     </target>
     <target name="start-debug"
-            description="Start OFBiz in debugging mode. It uses the 8091 port by default">
+            description="Start OFBiz in debugging mode. It uses the 8091 port by default. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
         <java jar="ofbiz.jar" fork="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
@@ -437,6 +437,7 @@ under the License.
             <jvmarg value="-Djava.compiler=NONE"/>
             <jvmarg value="-Xdebug"/>
             <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091"/>
+            <arg value="start-debug"/>
             <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
@@ -461,14 +462,14 @@ under the License.
         </java>
     </target>
     <target name="stop"
-            description="Stop OFBiz">
+            description="Stop OFBiz. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
         <java jar="ofbiz.jar" fork="true">
             <arg value="-shutdown"/>
             <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
     <target name="status"
-            description="Display status of OFBiz">
+            description="Display status of OFBiz. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
         <java jar="ofbiz.jar" fork="true">
             <arg value="-status"/>
             <arg value="-portoffset=${portoffset}"/>

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=1574405&r1=1574404&r2=1574405&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 Wed Mar  5 09:46:48 2014
@@ -44,19 +44,17 @@ public class Config {
         if (command.startsWith("-")) {
             command = command.substring(1);
         }
-        // shutdown & status hack
-        if (command.equalsIgnoreCase("shutdown")) {
-            command = "start";
-        } else if (command.equalsIgnoreCase("status")) {
-            command = "start";
-        }
         return "org/ofbiz/base/start/" + command + ".properties";
     }
 
     public static Config getInstance(String[] args) throws IOException {
         String firstArg = args.length > 0 ? args[0] : "";
-        // Needed when portoffset is used with these commands
-        if ("start-batch".equals(firstArg) || "stop".equals(firstArg)) {
+        // Needed when portoffset is used with these commands, start.properties fits for all of them
+        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)) {
             firstArg = "start";
         }
         String configFileName = getConfigFileName(firstArg);