Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349580

Summary: Add an option to (not) add the WTP classpath libraries when adding a Facet
Product: [WebTools] WTP Java EE Tools Reporter: Fred Bricon <fbricon>
Component: jst.j2eeAssignee: Chuck Bridgham <cbridgha>
Status: NEW --- QA Contact: Chuck Bridgham <cbridgha>
Severity: enhancement    
Priority: P3 CC: cbridgha, ccc, gregory.amerson, shr31223, stryker
Version: 3.3Keywords: plan
Target Milestone: Future   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=349575
Whiteboard: Maven

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()