Make the eventResourceGenerator task for the test files a separate task. Now one can do: ant codegen, compile outside of ant, ant compile-copy-resources, ant junit-compile-copy-resources.