Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314362 - <library-directory> element is appended to application.xml when Deployment Assembly page is opened
Summary: <library-directory> element is appended to application.xml when Deployment As...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Aidyl Kareh CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 17:17 EDT by Aidyl Kareh CLA
Modified: 2010-05-26 17:40 EDT (History)
4 users (show)

See Also:
jsholl: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
jsholl: pmc_approved? (naci.dai)
deboer: pmc_approved+
jsholl: pmc_approved? (neil.hauge)
jsholl: pmc_approved? (kaloyan)
cbridgha: review+


Attachments
Proposed Patch (1.52 KB, patch)
2010-05-25 17:22 EDT, Aidyl Kareh CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aidyl Kareh CLA 2010-05-25 17:17:57 EDT
Build Identifier: WTP 3.2

Opening the 'Deployment Assembly' preference page for an EAR project and clicking 'ok' to close it currently adds a library-directory node to the application.xml file even when the library directory is set to the default value. When the 'Deployment Assembly' preference page has '/lib' as its EAR library directory value, no node should be added to the application.xml file since this is the default value. This node should only be present in the DD if the user changes it to a different value. Also, if the user sets it to lib, it should be cleared from the DD.

Reproducible: Always

Steps to Reproduce:
1. Create a EAR with DD and all the default modules.
2. Right-click on the EAR project and select 'Properties'. 
3. Open the 'Deployment Assembly' preference page.
4. Click OK (closes preference page without making changes)
5.- The following library-directory element is appended to the application.xml:
       <library-directory>/lib</library-directory>
Comment 1 Aidyl Kareh CLA 2010-05-25 17:22:27 EDT
Created attachment 169905 [details]
Proposed Patch

This patch modifies the EarModuleDependenciesPropertyPage.updateLibDir() method to add an extra check so that if the library directory is set to the default value, the previous value is removed and no new value is added.
Comment 2 Chuck Bridgham CLA 2010-05-26 13:33:37 EDT
approve
Comment 3 Jason Sholl CLA 2010-05-26 13:52:12 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. 

By simply opening a properties page an application.xml file is generated.  Considering the optional nature of these files in EE5 and EE6, this is bad behavior.

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

No

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

Tested with UI; the fix is only in the UI layer, so no JUnit needed.

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

Check to ensure the lib folder is not the default before setting it.  This has bee reviewed by Chuck

    * What is the risk associated with this fix? 

No
Comment 4 Jason Sholl CLA 2010-05-26 17:40:10 EDT
code checked into head for wtp 3.2 rc3