Skip to content

Commit

Permalink
ARQ-2072 Let Tomcat start even if catalinaBase is not set (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjuranek authored and bartoszmajsak committed Feb 8, 2017
1 parent 67bf420 commit be1d696
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -62,9 +62,6 @@ public TomcatManagedConfiguration() {
if (javaHome == null || "".equals(javaHome)) {
javaHome = System.getProperty(JAVA_HOME_SYSTEM_PROPERTY);
}
if (catalinaBase == null || "".equals(catalinaBase)) {
catalinaBase = catalinaHome;
}
}

@Override
Expand All @@ -79,10 +76,13 @@ public void validate() throws ConfigurationException {
Validate.configurationDirectoryExists(javaHome,
"Either \"java.home\" system property, JAVA_HOME environment variable or javaHome property in Arquillian configuration "
+ "must be set and point to a valid directory! " + javaHome + " is not valid directory!");

Validate.isValidFile(getCatalinaBase() + "/conf/" + serverConfig,
"The server configuration file denoted by serverConfig property has to exist! This file: " + getCatalinaBase()
+ "/conf/" + serverConfig + " does not!");

//to keep backward compatibility, check catalinaBase only when it's set, otherwise catalinaHome will be used instead
if (catalinaBase != null && catalinaBase.length() != 0) {
Validate.isValidFile(getCatalinaBase() + "/conf/" + serverConfig,
"The server configuration file denoted by serverConfig property has to exist! This file: " + getCatalinaBase()
+ "/conf/" + serverConfig + " does not!");
}

// set write output to console
this.setOutputToConsole(AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
Expand Down

0 comments on commit be1d696

Please sign in to comment.