Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325644 - Imported Utility JARs should have their deploy path set to the library directory
Summary: Imported Utility JARs should have their deploy path set to the library directory
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.3   Edit
Assignee: Aidyl Kareh CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 15:10 EDT by Aidyl Kareh CLA
Modified: 2010-09-29 12:10 EDT (History)
3 users (show)

See Also:
cbridgha: review+


Attachments
Proposed Patch (15.85 KB, patch)
2010-09-17 15:18 EDT, Aidyl Kareh CLA
no flags Details | Diff
Updated Patch (15.85 KB, patch)
2010-09-29 10:32 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-09-17 15:10:04 EDT
Build Identifier: WTP 3.2.2

Using the 'Import' -> 'Java EE Utility Jar' functionality, currently sets the deploy path of the utility to the root of the EAR. Imported utility jars should have their deploy path set to the library directory if the EAR is EE5/EE6. This
behavior occurs when using any of the import options on the 'Utility Jar Import' wizard.

Steps to reproduce:
1) Create an EAR 5 or 6 project (with or without DD)
2) File -> Import -> JavaEE -> Java EE Utility Jar.
3) Hit next
4) The EAR you created should be selected
5) Option "Create Java projects from utility JARs" should be selected by default.
6) Hit next
7) Browse for a folder location that has a utility jar and hit ok.
8) Select a utility jar from the list and hit finish
9) Right click on the EAR project and go to Properties -> Deployment Assembly. You will see the the deploy path of the utility jar is set to the root (i.e. deploy path is set to '/MyUtil.jar' instead of the correct value '/lib/MyUtil.jar')

Reproducible: Always
Comment 1 Aidyl Kareh CLA 2010-09-17 15:18:45 EDT
Created attachment 179144 [details]
Proposed Patch

The attached patch updates the code for the different Java EE Utility Jar import options so that they take the library directory into consideration when placing imported files and when setting the deploy path of the Utility Jars in the EAR.
Comment 2 Chuck Bridgham CLA 2010-09-17 16:17:10 EDT
approved
Comment 3 Carl Anderson CLA 2010-09-29 01:59:08 EDT
Please note that in the attached patch, there are 3 calls to isEmpty(), which is only in Java 6- the plugins in WTP still adhere to Java 5 standards, so all of the calls to !<String>.isEmpty() should be replaced with <String>.length() > 0 or some other Java 5 equivalent.
Comment 4 Aidyl Kareh CLA 2010-09-29 10:32:25 EDT
Created attachment 179852 [details]
Updated Patch

Patch has been updated to replace using the <String>.isEmpty() method, which
is Java 6 specific, with a Java 5 equivalent.
Comment 5 Jason Sholl CLA 2010-09-29 12:10:29 EDT
code checked into 32M for WTP 3.2.3 and HEAD for 3.3