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

Bug 319881

Summary: Issues with modifying the 'Deploy Path' value of modules in Deployment Assembly Page
Product: [WebTools] WTP Java EE Tools Reporter: Aidyl Kareh <amkareh>
Component: jst.j2eeAssignee: Aidyl Kareh <amkareh>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: amkareh, ccc, david_williams, jsholl
Version: 3.2Flags: david_williams: pmc_approved+
amkareh: pmc_approved? (raghunathan.srinivasan)
amkareh: pmc_approved? (naci.dai)
deboer: pmc_approved+
amkareh: pmc_approved? (neil.hauge)
amkareh: pmc_approved? (kaloyan)
cbridgha: review+
Target Milestone: 3.2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Attachments:
Description Flags
Proposed Patch ccc: iplog+

Description Aidyl Kareh CLA 2010-07-14 12:38:53 EDT
Build Identifier: WTP 3.2.1

I saw some issues with changing the 'Deploy Path' of modules in Deployment Assembly Page:
1) The module's URI is not being updated in the application.xml file
2) If you generate the DD once you have modified the 'deploy path' of modules, then the 'org.eclipse.wst.common.component' file has additional entries with the deploy path set the default '/' value. 

Steps to recreate problem 1:
1) Create an Ear with all default modules and with DD file
2) Open the Deployment Assembly page and edit the "Deploy Path" column adding a "/modules" before the existing path
3) Open the application.xml
4) Notice the modules URI has not changed. The URI should now be prefixed with "/modules" like this: "/modules/sample.war"

Steps to recreate problem 2:
1) Create an Ear with all default modules and no DD file.
2) Open the Deployment Assembly page and edit the "Deploy Path" column adding a "/modules" before the existing path
3) Generate the DD
4) Notice the 'org.eclipse.wst.common.component' file has additional entries with the deploy path set the default '/' value. 

Reproducible: Always
Comment 1 Aidyl Kareh CLA 2010-07-14 12:53:37 EDT
Created attachment 174316 [details]
Proposed Patch

This patch fixes the following issues: 
1) The module's URI is not being updated in the application.xml file
    - The code was modified so that the correct archiveName and runtimePath were used when adding modules to the DD and calculating their URI. 
2) If you generate the DD once you have modified the 'deploy path' of modules,
then the 'org.eclipse.wst.common.component' file has additional entries with
the deploy path set the default '/' value.
    - The code was modified so that generating the DD did not create entries in the 'org.eclipse.wst.common.component' file.
Comment 2 Chuck Bridgham CLA 2010-07-14 17:11:37 EDT
approved - please add to PMC
Comment 3 Aidyl Kareh CLA 2010-07-14 17:29:53 EDT
    * 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. 

I saw the following issues when changing the 'Deploy Path' of modules in Deployment Assembly Page:
1) The module's URI is not being updated in the application.xml file.
2) If you generate the DD once you have modified the 'deploy path' of modules, then the 'org.eclipse.wst.common.component' file has additional entries with the deploy path set the default '/' value.

Not fixing these issues would make the user have to do extra work to correct the problems.


    * Is there a work-around? If so, why do you believe the work-around is
insufficient? 

The user would have to manually change the URI in the application.xml file and remove extra conflicting entries from the 'org.eclipse.wst.common.component' file.


    * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

Tested through UI.


    * Give a brief technical overview. Who has reviewed this fix? 

This patch fixes the following issues: 
1) The module's URI is not being updated in the application.xml file
    - The code was modified so that the correct archiveName and runtimePath were used when adding modules to the DD and calculating their URI. 
2) If you generate the DD once you have modified the 'deploy path' of modules, then the 'org.eclipse.wst.common.component' file has additional entries with the deploy path set the default '/' value.
    - The code was modified so that generating the DD did not create entries in the 'org.eclipse.wst.common.component' file. 

Chuck reviewed this patch.


    * What is the risk associated with this fix? 

Low.
Comment 4 Carl Anderson CLA 2010-07-15 11:07:13 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3