You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/11 20:48:59 UTC

[17/29] git commit: refs/heads/ui-plugins - CLOUDSTACK-1181: Find by catalina.home property first

CLOUDSTACK-1181: Find by catalina.home property first

The previous commit fails if a person had defined CATALINA_HOME already.
Instead of system env variable, get any passed variable 'catalina.home' and find
the file in that path.

Signed-off-by: Rohit Yadav <bh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/44287d20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/44287d20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/44287d20

Branch: refs/heads/ui-plugins
Commit: 44287d20c0c52a57db0c498f7e23793109c920f2
Parents: 23f7267
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Feb 11 12:14:46 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Feb 11 12:14:46 2013 +0530

----------------------------------------------------------------------
 developer/pom.xml                             |   10 ++++++++--
 utils/src/com/cloud/utils/PropertiesUtil.java |    8 ++++----
 2 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/44287d20/developer/pom.xml
----------------------------------------------------------------------
diff --git a/developer/pom.xml b/developer/pom.xml
index b0ae356..dba7b38 100644
--- a/developer/pom.xml
+++ b/developer/pom.xml
@@ -179,8 +179,8 @@
               </arguments>
               <systemProperties>
                 <systemProperty>
-                  <key>CATALINA_HOME</key>
-                  <value>${project.parent.basedir}/utils/</value>
+                  <key>catalina.home</key>
+                  <value>${project.parent.basedir}/utils</value>
                 </systemProperty>
               </systemProperties>
             </configuration>
@@ -287,6 +287,12 @@
                 <argument>--rootpassword=${db.root.password}</argument>
                 <!-- enable verbosity by -v or dash-dash-verbose -->
               </arguments>
+              <systemProperties>
+                <systemProperty>
+                  <key>catalina.home</key>
+                  <value>${project.parent.basedir}/utils</value>
+                </systemProperty>
+              </systemProperties>
             </configuration>
           </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/44287d20/utils/src/com/cloud/utils/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/PropertiesUtil.java b/utils/src/com/cloud/utils/PropertiesUtil.java
index 90f8af8..e256fce 100755
--- a/utils/src/com/cloud/utils/PropertiesUtil.java
+++ b/utils/src/com/cloud/utils/PropertiesUtil.java
@@ -70,14 +70,14 @@ public class PropertiesUtil {
         if (file.exists()) {
             return file;
         }
-        
-        newPath = System.getenv("CATALINA_HOME");
+
+        newPath = System.getProperty("catalina.home");
         if (newPath == null) {
-        	newPath = System.getenv("CATALINA_BASE");
+            newPath = System.getenv("CATALINA_HOME");
         }
         
         if (newPath == null) {
-        	newPath = System.getProperty("catalina.home");
+            newPath = System.getenv("CATALINA_BASE");
         }
         
         if (newPath == null) {