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.

Bug 211904 - Deleted Folders Reappear in Build When Java Project is "Run"
Summary: Deleted Folders Reappear in Build When Java Project is "Run"
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.2
Hardware: PC Windows Vista
: P3 normal with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 167164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-01 17:03 UTC by MackSix
Modified: 2012-06-22 04:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2012-05-01 17:03:12 UTC
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)
Comment 1 MackSix 2012-05-09 23:45:02 UTC
This looks like a duplicate of this: http://netbeans.org/bugzilla/show_bug.cgi?id=167164
Comment 2 Tomas Zezula 2012-05-10 07:55:31 UTC
*** Bug 167164 has been marked as a duplicate of this bug. ***
Comment 3 Tomas Zezula 2012-06-14 09:35:16 UTC
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!
Comment 4 Tomas Zezula 2012-06-14 09:39:56 UTC
If the problem is having just the empty folders it's not a problem. These packages never get into the jar file.
Comment 5 Tomas Zezula 2012-06-14 14:35:38 UTC
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
Comment 6 MackSix 2012-06-14 19:29:33 UTC
(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. :)
Comment 7 Tomas Zezula 2012-06-15 06:44:37 UTC
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.
Comment 8 Quality Engineering 2012-06-22 04:50:49 UTC
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"