public void validateConfiguration() {
// check the location of the static content/jsps etc
try {
if ((getWebAppSourceDirectory() == null) || !getWebAppSourceDirectory().exists()) {
throw new InvalidUserDataException("Webapp source directory "
+ (getWebAppSourceDirectory() == null ? "null" : getWebAppSourceDirectory().getCanonicalPath())
+ " does not exist");
} else {
logger.info("Webapp source directory = " + getWebAppSourceDirectory().getCanonicalPath());
}
} catch (IOException e) {
throw new InvalidUserDataException("Webapp source directory does not exist", e);
}
// check reload mechanic
if (!"automatic".equalsIgnoreCase(reload) && !"manual".equalsIgnoreCase(reload)) {
throw new InvalidUserDataException("invalid reload mechanic specified, must be 'automatic' or 'manual'");
} else {
logger.info("Reload Mechanic: " + reload);
}
// get the web.xml file if one has been provided, otherwise assume it is in the webapp src directory
if (getWebXml() == null) {
setWebXml(new File(new File(getWebAppSourceDirectory(), "WEB-INF"), "web.xml"));
}
logger.info("web.xml file = " + getWebXml());
//check if a jetty-env.xml location has been provided, if so, it must exist
if (getJettyEnvXml() != null) {
setJettyEnvXmlFile(jettyEnvXml);
try {
if (!getJettyEnvXmlFile().exists()) {
throw new InvalidUserDataException("jetty-env.xml file does not exist at location " + jettyEnvXml);
} else {
logger.info(" jetty-env.xml = " + getJettyEnvXmlFile().getCanonicalPath());
}
} catch (IOException e) {
throw new InvalidUserDataException("jetty-env.xml does not exist");
}
}
setExtraScanTargets(new ArrayList<File>());
if (scanTargets != null) {