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.
1) Make a Java project with 2 or 3 different packages with class files. 2) Delete 1 or 2 of the packages. 3) Clean & Build. Observe in Files>>Build>>Classes the associated folders are gone. 4) Run Project. Observe in Files>>Build>>Classes the associated folders reappear. 5) Delete Cache. Repeat Steps 3 & 4 and the folders do not reappear and now stay gone. Product Version: NetBeans IDE Dev (Build 201205010400) Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
This looks like a duplicate of this: http://netbeans.org/bugzilla/show_bug.cgi?id=167164
*** Bug 167164 has been marked as a duplicate of this bug. ***
I've tried and it works fine for me with recent build. After run the classes corresponding to source files contained in deleted packages are not in the build/classes. There are just the empty packages, the CoS synchronizer creates the packages as DFS so it may create empty package but it's not a problem. Please can you test it with a new 7.2 build? By: >different packages with class files You mean java source files, right? If you can reproduce it with a recent build, please try to reproduce this simple test case with: -J-Dorg.netbeans.modules.java.source.indexing.JavaIndex.level=FINEST after delete of packages you should see something like: FINE [org.netbeans.modules.java.source.indexing.JavaIndex]: scan started for root (file:/Users/tom/NetBeansProjects/JavaApplication12/src/) FINE [org.netbeans.modules.java.source.indexing.JavaIndex]: filesDeleted(........) FINE [org.netbeans.modules.java.source.indexing.JavaIndex]: Peer source roots for root file:/Users/tom/NetBeansProjects/JavaApplication12/src/ -> [] Thanks!
If the problem is having just the empty folders it's not a problem. These packages never get into the jar file.
If the problem is only the empty folders I've changed the BuildArtifactMapperImpl not to recreate the empty folders. However it seems to me as a P4 as these empty folders does not affect anything. Fixed jet-main a2e2c6b336ce
(In reply to comment #3) > I've tried and it works fine for me with recent build. > After run the classes corresponding to source files contained in deleted > packages are not in the build/classes. There are just the empty packages, the > CoS synchronizer creates the packages as DFS so it may create empty package but > it's not a problem. > > Please can you test it with a new 7.2 build? > > By: > >different packages with class files > You mean java source files, right? I think I saw some class files reappear in the build folder for delete java files and thought that was happening, but I do not see it in 20120614. I could have been mistaken about that. I supposed if only the folders come back it is a P4, but I am glad someone took a look at it anyway. Thanks. :)
Thanks for verification. Right, if the class files re-appear it will be a big problem. In the next version (post 7.2) even the empty folders are not copied.
Integrated into 'main-golden', will be available in build *201206220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a2e2c6b336ce User: Tomas Zezula <tzezula@netbeans.org> Log: #211904:Deleted Folders Reappear in Build When Java Project is "Run"