This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have a j2seproject which defines an annotation processor in src/ (together with a registration in src/META-INF/services/javax.annotation.processing.Processor). Files in test/ are intended to be processed. This used to work but stopped working after I upgraded build-impl.xml from the recent AP work. Verbose mode shows that -processorpath is passed but it contains just ${javac.classpath}. I do not want to set javac.processorpath to include build/classes because that would be wrong when compiling src/ initially. The problem here is that you are assuming that a single ${ap.cmd.line.internal} is suitable for both main sources and tests, whereas there should be two independent sets of properties.
Workaround (assuming you want to run all processors in CP, the default): <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3"> <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}" apcmdline=""/> <copy todir="${build.test.classes.dir}"> <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> </copy> </target>
Integrated into 'main-golden', will be available in build *201002040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b0946bc11c81 User: Jan Lahoda <jlahoda@netbeans.org> Log: #180048, #180033, #180034: improving the build-impl.xml (and related parts) to handle processorpath with spaces, run APs in tests that are defined in src folders, etc.
Shouldn't this report be closed as fixed?
It should be closed - it is possible, however, that we will need more changes to the build script in the future, as we get new reports.