} 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);
executeExmlc(exmlc);
} catch (ExmlcException e) {
throw new MojoFailureException(e.toString(), e);
}
if (compileLog.hasErrors()) {
throw new MojoFailureException("There were EXML compiler errors, see log for details.");
}
getProject().addCompileSourceRoot(gSourcesDirectory.getPath());
}