if (!generatedResourcesDirectory.exists()) {
getLog().info("generating resources into: " + generatedResourcesDirectory.getPath());
getLog().debug("created " + generatedResourcesDirectory.mkdirs());
}
ExmlConfiguration exmlConfiguration = new ExmlConfiguration();
exmlConfiguration.setConfigClassPackage(configClassPackage);
exmlConfiguration.setClassPath(getActionScriptClassPath());
exmlConfiguration.setOutputDirectory(gSourcesDirectory);
exmlConfiguration.setResourceOutputDirectory(generatedResourcesDirectory);
List<File> sourcePath = getSourcePath();
try {
exmlConfiguration.setSourcePath(sourcePath);
} catch (IOException e) {
throw new MojoExecutionException("could not determine source directory", e);
}
exmlConfiguration.setSourceFiles(getMavenPluginHelper().computeStaleSources(sourcePath, includes, excludes, gSourcesDirectory, Exmlc.EXML_SUFFIX, Jooc.AS_SUFFIX, staleMillis));
if (StringUtils.isNotEmpty(validationMode)) {
try {
exmlConfiguration.setValidationMode(ValidationMode.valueOf(validationMode.toUpperCase()));
} catch (IllegalArgumentException e) {
throw new MojoFailureException("The specified EXML validation mode '" + validationMode + "' is unsupported. " +
"Legal values are 'error', 'warn', and 'off'.");
}
}
CompileLog compileLog = new MavenCompileLog();
exmlConfiguration.setLog(compileLog);
Exmlc exmlc;
try {
getLog().debug("Exmlc configuration: " + exmlConfiguration);
exmlc = new Exmlc(exmlConfiguration);