this exception is thrown in the SunJavaCompiler. It means that it is unable to find the compilie method "compile" in class "com.sun.tools.javac.Main".
So I think your problem is that tools.jar is not added correctly to your testClasspath. This is currently achieved by:
classpath += System.getProperty("java.home") + "/lib/tools.jar:";
this ispired by the CTFRun script, where it says:
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
it works fine for me on unix (mac).
you can run mvn test with the -X property, then the classpath is printet out before test execution. Please check the path to the tools.jar in the debug message: "DEBUG classpath for sourcegenerator is: ..."
Createtd some small quickfix to use the xmlctf with maven. So it's easier for me to test, just have to "mvn install" the codegen module and run "mvn antrun:ant" in the xmlctf module.