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>
This commit is contained in:
Rohit Yadav 2013-02-11 12:14:46 +05:30
parent 23f7267753
commit 44287d20c0
2 changed files with 12 additions and 6 deletions

View File

@ -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>

View File

@ -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) {