When using JDK1.6 and with the enhancer/ASM in the classpath there is a time lag of 100 seconds. This is down to the enhancer "processor" waiting for things to be compiled before it bothers trying to enhance (seemingly). To quote from a users investigation
"After adding some logging, I see now what the enhancer is doing. As it is called by javac during compilation, it doesn't actually do the enhancement. Instead, it just keep track of which classes use the JDO annotations and builds a list of the corresponding .class files that it expects will be generated by the compilation. It starts up the EnhanceRunnable thread to sit in the background and wait for all of those .class files to be produced by the compiler.
But there is a problem: if the enhancer isn't looking for the .class files in the right location, that allExists() method will return false, and the loop within the EnhanceRunnable will wait for 100 seconds (1000 iterations of 100ms each). After that loop ends, it will go ahead and try to do the bytecode enhancement anyway.
In my case, the enhancer is looking for the .class files under "." rather than "./target" ... so it never finds the files in question, and it waits 100 seconds."
This needs resolving to provide reliable JDK1.6 compilation-stage enhancement