Question

I need to easily test my annotation processors, so I prepared Ant script to launch javac with all the necessary options set. Unfortuantely, as stated in another thread:

By default the task compares the timestamps of .java and corresponding .class files, and only tells the Java compiler to recompile source files that are newer than their corresponding object files, or that don't have an object file at all.

It's great for me most of the times but not when I need to test my annotation processor for which I need javac to be launched each time, no matter if corresponding .class file already exist.

Is there any way to disable this ant default behaviour? I looked through all options of javac task but found nothing. Is there any solution other then cleaning output directory?

Était-ce utile?

La solution

Based on your quote if you delete the .class files, the compiler will be forced to recompile the .java file

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top