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.
Visual web framework requires to add different kind of libraries, e.g., 1st set of libraries: (e.g., libs.jsf-support.classpath) these libraries will be used for both Compile and WAR file. I think in the project customizer, it is shown in category 'Libraries', with 'Package' checked. 2nd set of libraries: (e.g., libs.jdbcsupport-designtime.classpath) these libraries will only be used for Compile but not in the WAR file. I think in the project customizer, it is shown in category 'Libraries', with 'Package' un-checked. 3rd set of libraries:(e.g., libs.jdbcsupport-runtime.classpath) these libraries will only be used for WAR file but not for Compile. I think in the project customizer, it is shown in category 'Build->Packaging', Path in WAR
The first requirement was addressed by WebProjectClassPathModifier (issue #73198). Last two requirements can be addressed by WebProjectLibrariesModifier which can be get from project's lookup. Checking in api/WebProjectLibrariesModifier.java; /cvs/web/project/src/org/netbeans/modules/web/project/api/WebProjectLibrariesModifier.java,v <-- WebProjectLibrariesModifier.java initial revision: 1.1 done Checking in classpath/WebProjectLibrariesModifierImpl.java; /cvs/web/project/src/org/netbeans/modules/web/project/classpath/WebProjectLibrariesModifierImpl.java,v <-- WebProjectLibrariesModifierImpl.java initial revision: 1.1 done Checking in WebProject.java; /cvs/web/project/src/org/netbeans/modules/web/project/WebProject.java,v <-- WebProject.java new revision: 1.110; previous revision: 1.109 done
Both addCompileLibraries and addPackageLibraries work great! But addCompileRoots and addPackageRoots do not work. I don't see the added roots in the project customizer.
Add Radko's comments here for tracking this API enhancement: //TODO: implement remove* methods" in WebProjectLibrariesModifier. I need to change 'Enhancement' to 'Defect' because add*Root methods are not working. It afects adding visualweb I18N localized jars, websvc, ...
Fixed problem with add*Root methods. Missing "!" in the condition, I'm sorry. Downgrading to P3 and leaving opened till remove* methods are implemented. Checking in WebProjectLibrariesModifierImpl.java; /cvs/web/project/src/org/netbeans/modules/web/project/classpath/WebProjectLibrariesModifierImpl.java,v <-- WebProjectLibrariesModifierImpl.java new revision: 1.2; previous revision: 1.1 done
Thanks! But looks like there is a regression now; addPackageRoots will remove addPackageLibraries. I.e., if only calls addPackageLibraries, then works good. if also calls addPackageRoots, then only 'roots' remained, 'libraries' gone!
Temporary using the visual model for additional package roots till the real source of missing libraries problem is fixed. Checking in ui/customizer/WarIncludesUiSupport.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/WarIncludesUiSupport.java,v <-- WarIncludesUiSupport.java new revision: 1.5; previous revision: 1.4 done Checking in classpath/WebProjectLibrariesModifierImpl.java; /cvs/web/project/src/org/netbeans/modules/web/project/classpath/WebProjectLibrariesModifierImpl.java,v <-- WebProjectLibrariesModifierImpl.java new revision: 1.3; previous revision: 1.2 done
//TODO: implement remove* methods" in WebProjectLibrariesModifier. Is it possible these methods been implemented for 6.0M10? Complib migration is dependent on these APIs. Besides, is it possible to add 'hasCompileLibrary', 'hasPackageLibrary', 'hasCompileRoot', and 'hasPackageRoot' APIs? Visual Web EJB needs these methods, Edwin may have more details here. Or, the client site can code itself for getting this info.
I'm aware of it, it is on my tasklist.
Remove* methods implemented. Test must be written before closing the issue. Checking in api/WebProjectLibrariesModifier.java; /cvs/web/project/src/org/netbeans/modules/web/project/api/WebProjectLibrariesModifier.java,v <-- WebProjectLibrariesModifier.java new revision: 1.2; previous revision: 1.1 done Checking in classpath/WebProjectLibrariesModifierImpl.java; /cvs/web/project/src/org/netbeans/modules/web/project/classpath/WebProjectLibrariesModifierImpl.java,v <-- WebProjectLibrariesModifierImpl.java new revision: 1.5; previous revision: 1.4 done
I am trying to fix the following migration bug #101642 in visualweb where a Creator 2 project is opened in NB6. The problem is that the UI shows there are unresolved references and asks the user to fix them. As part of project migration, these references should just be deleted and this is possible to do manually with the UI. However, this should be done automatically by the IDE so I would like to add code to my module to resolve these refs so the user does not have to as part of a migration step. However, as I understand it, there is not an API to do this. I need help resolving this issue. Po-ting tells me that I need to talk to Petr Pisl. Could Petr suggest a solution?
You can just use the remove* APIs under this issue to remove the references (they are already available). I think your request is to add has* APIs to detect the no-longer-needed references.
But, how do I enumerate the references? I'd like to enumerate the broken references in the "Libraries" and "Build->Packaging" sections and delete them. This is easy to do in the UI but how do I do this programmatically? Also, this needs to be done before the code that asks the user to resolve the broken references gets invoked or there may be a race condition. To be safe, it should also be possible find out the name of the references and delete only some of them. That way if the project had some other broken references that are unrelated to component libraries, the user would be able to fix them using the normal NetBeans UI.
This last comment is too far away from the original report, I think we got too far away. Can you please file it as a separate issue, if this is a request?
I agree with Petr Jiricka that Edwin's comment doesn't fit the original problem. Closing this. File a different issue.
I created issue 110040 and would appreciate any help.
We have the same requirement for Compile time classpaths in PortalPack project (http://portalpack.netbeans.org). FYI, Portal Pack project is a netbeans.org project for Portlet support. This module provides a "Portlet Support" framework which can be added to a web application. In this module we have the same requirement of adding some libraries which are required only during compile time. I saw that this issue is fixed but as these apis are not public and Portal Pack is not a friend package of web project, we can't actually use these api in our Portlet Web Framework. Could you please suggest any way to use these apis ? I would really appreciate any help on this. Thanks
For NetBeans 6.0 you have to possibilities. You can have implementation dependency (I don't recommend this) or better way - write the name of your module and I will put your module as a friend of the api.
Thanks for your response. The module name is org.netbeans.modules.portalpack.portlets.genericportlets Could you please add it as a friend module ?
Done. org.netbeans.modules.portalpack.portlets.genericportlets module is in the list of friend modules.