Skip to content

Commit 44287d2

Browse files
committed
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 <bhaisaab@apache.org>
1 parent 23f7267 commit 44287d2

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

developer/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@
179179
</arguments>
180180
<systemProperties>
181181
<systemProperty>
182-
<key>CATALINA_HOME</key>
183-
<value>${project.parent.basedir}/utils/</value>
182+
<key>catalina.home</key>
183+
<value>${project.parent.basedir}/utils</value>
184184
</systemProperty>
185185
</systemProperties>
186186
</configuration>
@@ -287,6 +287,12 @@
287287
<argument>--rootpassword=${db.root.password}</argument>
288288
<!-- enable verbosity by -v or dash-dash-verbose -->
289289
</arguments>
290+
<systemProperties>
291+
<systemProperty>
292+
<key>catalina.home</key>
293+
<value>${project.parent.basedir}/utils</value>
294+
</systemProperty>
295+
</systemProperties>
290296
</configuration>
291297
</plugin>
292298
</plugins>

utils/src/com/cloud/utils/PropertiesUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ public static File findConfigFile(String path) {
7070
if (file.exists()) {
7171
return file;
7272
}
73-
74-
newPath = System.getenv("CATALINA_HOME");
73+
74+
newPath = System.getProperty("catalina.home");
7575
if (newPath == null) {
76-
newPath = System.getenv("CATALINA_BASE");
76+
newPath = System.getenv("CATALINA_HOME");
7777
}
7878

7979
if (newPath == null) {
80-
newPath = System.getProperty("catalina.home");
80+
newPath = System.getenv("CATALINA_BASE");
8181
}
8282

8383
if (newPath == null) {

0 commit comments

Comments
 (0)