Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330037 - When importing an Ear, modules in the DD some times do not have a module ID in the component file.
Summary: When importing an Ear, modules in the DD some times do not have a module ID i...
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 XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Scott Huff CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 14:33 EST by Scott Huff CLA
Modified: 2010-11-15 13:50 EST (History)
2 users (show)

See Also:
cbridgha: review+


Attachments
Proposed Patch (1.46 KB, patch)
2010-11-11 14:35 EST, Scott Huff CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Huff CLA 2010-11-11 14:33:36 EST
It was discovered that, in EARComponentImportOperation.java, a check (line 153) of whether or not a component is already in the DD or not, is incomplete; a component with a leading slash in its deploy path is treated as if they are not already in the DD.

To Recreate:
-Create a new Ear project with a DD and all default modules.
-Change some modules deploy path to have a leading slash.
-Export the Ear, then Import the Ear.
-Compare the component file and the application.xml, the module id entries are missing from the component file.
Comment 1 Scott Huff CLA 2010-11-11 14:35:40 EST
Created attachment 182933 [details]
Proposed Patch

Proposed Patch:
  Add a check to see if the uri as an absolute path as well as the given, non absolute path is in the DD.
Comment 2 Jason Sholl CLA 2010-11-15 13:45:48 EST
Code checked into 32M and HEAD for WTP 3.2.3 and 3.3.
Comment 3 Chuck Bridgham CLA 2010-11-15 13:50:49 EST
approve