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.
Summary: | unwanted "lib" folder created for every opened/created project | ||
---|---|---|---|
Product: | obsolete | Reporter: | Milos Kleint <mkleint> |
Component: | visualweb | Assignee: | _ potingwu <potingwu> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | dkonecny, edwingo, jglick, jlahoda, pjiricka, potingwu, ppisl |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | patch fixing the problem |
Description
Milos Kleint
2007-06-18 14:30:20 UTC
This is created by complib. I don't know what the right fix is for this bug. As I understand it, libraries for a project should go under the "lib" directory. I know of at least two modules "complib" and "ejb" that need to add libraries for a project so I believe these are the right places for them. Could someone advise me on how to fix this problem? I'll temporarily reassign this to jglick since he might know. Feel free to call me on my cell if you want to chat. Do not create empty folders for no reason. I suppose "${basedir}/lib" is as good a place as any for a new folder that you actually intend to put libraries in. OK, I misunderstood the original bug. The bug is that an empty "lib" folder is created not that there are complib specific libraries in it. Thanks Jesse. *** Issue 106632 has been marked as a duplicate of this issue. *** Corrupting unrelated projects is a serious bug - sufficient grounds for removing the module from the build. I have tried to put in a hotfix, but JsfProjectUtils.getProjectLibraryDirectory is called from several other places and so it is not clear if the problem is completely fixed. Checking in EjbLibReferenceHelper.java; /shared/data/ccvs/repository/visualweb/ejb/src/org/netbeans/modules/visualweb/ejb/nodes/EjbLibReferenceHelper.java,v <-- EjbLibReferenceHelper.java new revision: 1.8; previous revision: 1.7 done OK, I will fix this bug today since a couple people have been complaining about it. One cause in visualweb/complib has been fixed, but there are two other modules that could cause this. I think these modules you mentioned should first check whether this is a visualweb project or not, then applied your codes. Therefore it won't disturb other project types and also improve the performance. In visualweb project, there is API for this checking. This is old Creator code and it looks like Jesse checked in an equivalent fix so I'm closing this bug. Actually, it may not exactly be equivalent WRT performance so I'm adding the API that potingwu mentions. I checked in a fix for the one stack trace I actually observed. I could not and did not verify that other callers of the guilty method would not be invoked against non-visualweb projects. Verified using: NB6: 200706220000 Woodstock 4.1 200706220934 My web app did not have a lib directory. I found another place where the problem can occur under different conditions and checked in a fix. *** Issue 98741 has been marked as a duplicate of this issue. *** *** Issue 138048 has been marked as a duplicate of this issue. *** As described in issue 138048 this problem is back. I would accept the lib folder if something was in it but it is empty. And what's more if I delete it and restart IDE the lib folder is recreated. Po-ting, can you look into this please ? thanks We need to concentrate the work on handling the project deleting now. Change it back to fixed. Created attachment 65300 [details]
patch fixing the problem
As I've already said issue 138048 is not related to project deletion. If I create a Web project with Visual JSF and have no intention of deleting it I still get lib folder created and if I remove it from my project structure it gets recreated for not reason after IDE restart. That's different problem to one described in issue 107029. Anyway, potingwu, could you please apply attached patch to your code. Or I can push it if you agree with it. It fixes the problem described in this issue and in the issue 138048. It is the same fix as Jesse did a year ago just in different place. It avoids calling JsfProjectUtils.getProjectLibraryDirectory (which always creates lib folder) in places where you just check for presence of a folder and do not do anything with the folder. Thanks, -David Thanks! Please push your fix. Patch integrated: 0bc28b1a99a8 Integrated into 'main-golden', available in NB_Trunk_Production #339 build Changeset: http://hg.netbeans.org/main/rev/0bc28b1a99a8 User: David Konecny <dkonecny@netbeans.org> Log: #107000 - avoid creating unwanted "lib" folder for every opened/created project with visual JSF |