classpathStr.append(System.getProperty("path.separator"));
}
Thread.currentThread().setContextClassLoader(ucl);
JspC jspc = new JspC();
jspc.setWebXmlFragment(webXmlFragment);
jspc.setUriroot(webAppSourceDirectory);
jspc.setPackage(packageRoot);
jspc.setOutputDir(generatedClasses);
jspc.setValidateXml(validateXml);
jspc.setClassPath(classpathStr.toString());
jspc.setCompile(true);
jspc.setSmapSuppressed(suppressSmap);
jspc.setSmapDumped(!suppressSmap);
jspc.setJavaEncoding(javaEncoding);
// JspC#setExtensions() does not exist, so
// always set concrete list of files that will be processed.
String jspFiles = getJspFiles(webAppSourceDirectory);
System.err.println("Compiling "+jspFiles);
System.err.println("Includes="+includes);
System.err.println("Excludes="+excludes);
jspc.setJspFiles(jspFiles);
if (verbose)
{
getLog().info("Files selected to precompile: " + jspFiles);
}
try
{
jspc.setIgnoreJspFragmentErrors(ignoreJspFragmentErrors);
}
catch (NoSuchMethodError e)
{
getLog().debug("Tomcat Jasper does not support configuration option 'ignoreJspFragmentErrors': ignored");
}
try
{
if (schemaResourcePrefix != null)
jspc.setSchemaResourcePrefix(schemaResourcePrefix);
}
catch (NoSuchMethodError e)
{
getLog().debug("Tomcat Jasper does not support configuration option 'schemaResourcePrefix': ignored");
}
if (verbose)
jspc.setVerbose(99);
else
jspc.setVerbose(0);
jspc.execute();
Thread.currentThread().setContextClassLoader(currentClassLoader);
}