Community
Participate
Working Groups
Build Identifier: WTP 3.2 The Deployment Assembly properties page for EAR projects currently set the deploy path of module project to '/lib/ModuleName'. If you add the modules during EAR project creation the deploy path of modules are set to '/ModuleName'. I would expect the deployment assembly page to recognize a (non-Utility) Java EE module and default to placing it in the root directory. Reproducible: Always Steps to Reproduce: 1. Create an EAR project with all default modules 2. Right-click on new EAR project and open the Properties page. 3. In the Deployment Assembly preference page, remove one of the module project references. 4. Click on 'Add...' button to open 'New Reference Wizard', and select the 'Project' node and click next. 5. Select the project you just remove and click 'Finish' (the deploy path is now '/lib/ModuleName' instead of '/ModuleName')
Created attachment 168275 [details] Proposed Patch This patch adds a CustomEARProjectReferenceWizardFragment class which extends the ProjectReferenceWizardFragment class and overwrites the RuntimePath value of module projects to set it to the root directory.
Created attachment 168281 [details] Updated Proposed Patch Same as previous patch but this patch changes the display of the 'Project Reference' node to be 'Project' (for consistency).
Created attachment 168282 [details] Icon For consistency with other 'Project' nodes displayed in the 'New Reference Wizard', the prj_obj.gif icon (obtained from org.eclipse.wst.common.modulecore.ui) needs to be added.
approved
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. Currently when you add a project reference using the Deployment Assembly properties page for EAR projects, the deploy path is set to '/lib/ModuleName'. If you add the modules during EAR project creation the deploy path of modules are set to '/ModuleName'. Having the deploy path be '/lib/ModuleName' would mean that the contents of that module are put on the classpath for all other modules to see. The deployment assembly page should recognize a (non-Utility) Java EE module and default to placing it in the root directory (the same deploy path value that is set during project creation where modules are added to an EAR). * Is there a work-around? If so, why do you believe the work-around is insufficient? The user can change the default deploy path value using the Deployment Assembly properties page. However, the default value when adding a Java EE module references should be consistent with adding modules during project creation by placing it in the root directory. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Manually tested deployment assembly window on different scenarios. * Give a brief technical overview. Who has reviewed this fix? This fix adds a CustomEARProjectReferenceWizardFragment class which extends the ProjectReferenceWizardFragment class and overwrites the RuntimePath value for Java EE module projects to set it to the root directory instead of under the '/lib' folder. An icon was also added so that the display of the 'Project' node in the 'New Reference Wizard' is consistent with the default. Chuck Bridgham has reviewed this patch. * What is the risk associated with this fix? I believe the risk is minimal since the fix only modifies the default deploy path value when adding project references using the deployment assembly preferences page on an EAR project. This default deploy path value can always be changed by the user using deployment assembly preferences page.
This sounds important, and I'd have no reason to object ... but, can we get some wider review before committing? Rob, does this look right and fit your use cases? Perhaps Kaloyan is able to review?
This looks like it should be perfectly acceptable =]
ty
code checked into head for wtp 3.2 rc2