private static JavaCompiler determineJavaCompiler() {
List compilers = new ArrayList();
// this doesn't work because with Maven we need to set the classpath
// explicitly as the "current" classpath does not include our
// dependencies
compilers.add(new Java6Compiler());
compilers.add(new SunJavaC());
compilers.add(new CommandLineJavac());
for (Iterator i = compilers.iterator(); i.hasNext();) {
JavaCompiler compiler = (JavaCompiler) i.next();
if (compiler.isAvailable()) {