DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32099>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32099 apt task fork attribute should default to true Summary: apt task fork attribute should default to true Product: Ant Version: 1.7Alpha (nightly) Platform: PC OS/Version: Windows XP Status: NEW Severity: Minor Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The Apt task currently inherits the default value of false for the fork attribute from Javac. On my Windows box (and, I expect, on any platform/OS), this means that two distinct class loaders end up loading AnnotationProcessorFactory, one via org.apache.tools.ant.launch.Launcher.run and one via com.sun.tools.apt.comp.Apt.main. Because of this, if tools.jar is not on the factorypath/classpath/bootclasspath, Apt throws a NoClassDefFoundError for AnnotationProcessorFactory even though an AnnotationProcessorFactory class was loaded by Launcher). OTOH, if tools.jar _is_ on the factorypath/classpath/bootclasspath, a class implementing AnnotationProcessorFactory will produce the message "Specified factory, 'xxx', is not an AnnotationProcessorFactory", because the implementing class is loaded by the apt class loader and the AnnotationProcessorFactory class it gets cast to was loaded by another class loader, so the cast fails. The point is that it can be very difficult to get the Apt task to work with fork="false". There would be a lot less head-scratching if fork just defaulted to true or there were some mention in the docs about using fork="true" if you have trouble with fork="false". --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]