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.
My initial impl of issue #145243 did not work out so well. QUICK_CLEAN is supposed to delete any NB-generated *.class files, and it does. I wanted to do this before the user runs any real Ant target on the project. Unfortunately, the JavaRunner implementation uses Ant to implement QUICK_CLEAN, and this displays an Ant window "clean" which is very distracting. The problem is worse because autoproject does not know whether QUICK_CLEAN is really needed - BuildArtifactMapperImpl makes this decision - so it always runs the clean target. As a partial workaround, I will change autoproject to run QUICK_CLEAN only if .netbeans_automatic_build can be found in the classes dir, at least reducing the number of times the problem happens. If this bug is not fixed, I may be forced to implement the equivalent of QUICK_CLEAN by hand. Please change JavaRunnerImpl to perform cleaning without using Ant. There is no advantage to going through Ant for this purpose.
Working around in contrib #569eae9475a4. I had also mistakenly failed to wait for the ExecutorTask from QUICK_CLEAN to complete before running the regular Ant task. With that fixed, the situation is a bit better because usually the real task will reuse the same process window. Of course this will not be true for Maven projects.
http://hg.netbeans.org/main/rev/ab1d44805f9b
just a quick question. What are the cannonical usecases for the QUICK_CLEAN Java runner?
Don't forget you can delete clean-snippet.xml and the clean attr of TranslateClassPath. I will remove the workaround in autoproject: contrib #43462eede110 Milos: QUICK_CLEAN should be run before running any target on the project which might possibly create a production artifact, to delete any class files generated by the NB internal compiler. These files are made to have an old timestamp, so they would probably be recompiled by javac anyway, but better safe than sorry. http://wiki.netbeans.org/CompileOnSave#section-CompileOnSave-LocationOfClassesToExecute has discussion. You can see http://hg.netbeans.org/main/contrib/raw-file/tip/autoproject.java/src/org/netbeans/modules/autoproject/java/actions/ActionProviderImpl.java#cleanGeneratedClassfiles for an example.
Integrated into 'main-golden', will be available in build *200811110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ab1d44805f9b User: Jan Lahoda <jlahoda@netbeans.org> Log: #152728: do not execute ant for QUICK_CLEAN.
Review the parenthetical note in bug #199145 comment #1 if you have not done so already.