Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311374 - Adding binary jar references to EAR project includes extra ".jar" extension
Summary: Adding binary jar references to EAR project includes extra ".jar" extension
Status: VERIFIED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Rob Stryker CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 09:49 EDT by Larry Isaacs CLA
Modified: 2010-05-11 15:52 EDT (History)
2 users (show)

See Also:
cbridgha: review+


Attachments
Patch to add check for binary references to AddComponentToEnterpriseApplicationDataModelProvider (1.61 KB, patch)
2010-05-03 09:49 EDT, Larry Isaacs CLA
stryker: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Isaacs CLA 2010-05-03 09:49:40 EDT
Created attachment 166774 [details]
Patch to add check for binary references to AddComponentToEnterpriseApplicationDataModelProvider

If you add a binary jar reference (or other type of binary reference for that matter) to an EAR project using the Deployment Assembly page, it will initially appear correct.  However, if you close and re-open the Deployment Assembly page, that reference will include an extra ".jar" on the end of the Deploy Path.

The culprit appears to be AddComponentToEnterpriseApplicationDataModelProvider, where the default map it creates for TARGET_COMPONENTS_TO_URI_MAP is incorrect.  It appears to only be expecting project type references since it is using the project to test for the type of reference, which will be the parent EAR project for binary references.  This causes method to always add ".jar" by default.  As far as I know, binary references will already include the file's extension in the name, so adding another extension is unnecessary.  The attached patch adds an isBinary() check to avoid the extra extension.

Marking major since if a binary war file was referenced, changing the extension to ".jar" could affect deployment.
Comment 1 Carl Anderson CLA 2010-05-03 10:38:33 EDT
Assigning to Rob for initial investigation.
Comment 2 Rob Stryker CLA 2010-05-06 05:09:12 EDT
Patch looks good to me.  Chuck?
Comment 3 Chuck Bridgham CLA 2010-05-06 14:53:01 EDT
approved
Comment 4 Rob Stryker CLA 2010-05-07 02:36:25 EDT
Committed
Comment 5 Larry Isaacs CLA 2010-05-11 15:52:47 EDT
Verified the extra ".jar" is no longer being appended using WTP I-3.2.0-20100511060448 build.