config.setClasspathEntries(Arrays.asList(projectClasspath));
try {
JavacCompiler javac = new JavacCompiler();
getLog().debug("Compiling event interface using: " + Arrays.toString(javac.createCommandLine(config)));
List<CompilerError> messages = javac.compile(config);
checkForCompilerErrors(messages, classToCompile);
} catch (CompilerException e) {
throw new MojoExecutionException("Cannot compile event interface: " + classToCompile, e);
}
}