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

Bug 330037

Summary: When importing an Ear, modules in the DD some times do not have a module ID in the component file.
Product: [WebTools] WTP Java EE Tools Reporter: Scott Huff <shuff>
Component: jst.j2eeAssignee: Scott Huff <shuff>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, jsholl
Version: 3.2Flags: cbridgha: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch none

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