Bug 349580 - Add an option to (not) add the WTP classpath libraries when adding a Facet
Summary: Add an option to (not) add the WTP classpath libraries when adding a Facet
Status: NEW
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Chuck Bridgham CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: Maven
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-06-16 11:17 EDT by Fred Bricon CLA
Modified: 2014-02-05 15:47 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Bricon CLA 2011-06-16 11:17:44 EDT
Build Identifier: 

m2e-wtp 0.13.0 only uses the Maven Library claspath container, as announced here : http://dev.eclipse.org/mhonarc/lists/m2e-users/msg00692.html

Webapp and EAR libraries used to conflict with the Maven Library and introduce dependency leakage issues while running unit tests, so the are now removed from Maven projects' classpath. Similarly to bug #349575, the proper way would be to add a new DataModel variable that would basically allow m2e-wtp to not add these classpath containers. Something like :
IDataModel modelConfig = ....
...
modelConfig.setProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_WEBAPP_LIBRARY_CONTAINER, false);
modelConfig.setProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_EAR_LIBRARY_CONTAINER, false);
..

Default value would be true, to keep existing behaviour 

Reproducible: Always
Comment 1 Rob Stryker CLA 2011-06-17 01:06:22 EDT
Fred:  If you could make a patch, I can definitely help to get it committed and approved, possibly for 3.3.1 if I can get approvals. 

Assuming you don't have the full dev environment to make a patch, if you can at least describe the few classes that changes need to be made in to give me a head start, I can definitely assist you in getting a patch made and committed. 

Ping me if you need help.
Comment 2 Fred Bricon CLA 2011-06-17 03:31:21 EDT
I'll probably won't start looking until after the Indigo release. I have my own release to take care of first ;-) But don't worry I know how to contact you :-)
Comment 3 Fred Bricon CLA 2011-06-17 03:36:30 EDT
> Default value would be true, to keep existing behaviour 

Chuck mentioned J2EEPreferences.getUseEARLibraries() and J2EEPreferences.getUseWebLibaries() as workspace preferences to add these libraries. I guess the default values I mentioned would need to be null, in order to keep using J2EEPreferences.getUseXYZLibraries()