use of com.dexels.navajo.mapping.compiler.SkipCompilationException in project navajo by Dexels.
the class BundleCreatorComponent method compileAndCreateBundle.
private void compileAndCreateBundle(String script, File scriptPath, final String scriptTenant, boolean hasTenantSpecificFile, boolean forceTenant, boolean keepIntermediate, List<String> success, List<String> skipped, List<String> failures) throws CompilationException {
String myScript = script;
if (forceTenant) {
myScript = script + "_" + scriptTenant;
}
try {
getScriptCompiler(scriptPath).compile(scriptPath, scriptTenant, hasTenantSpecificFile, forceTenant);
if (getScriptCompiler(scriptPath).scriptNeedsCompilation()) {
javaCompiler.compileJava(myScript);
}
javaCompiler.compileJava(myScript + "Factory");
createBundleJar(myScript, scriptPath, scriptTenant, keepIntermediate, hasTenantSpecificFile);
success.add(myScript);
} catch (SkipCompilationException e) {
logger.debug("Script fragment: {} ", script);
skipped.add(script);
return;
} catch (Exception e) {
failures.add(script);
throw new CompilationException("Error compiling script", e);
}
if (forceTenant) {
logger.info("Finished compiling and bundling {} for {}", script, scriptTenant);
} else {
logger.info("Finished compiling and bundling {}", script);
}
}
Aggregations