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

Bug 326413

Summary: Imported Utility JARs should have their deploy path set to the library directory
Product: [WebTools] WTP Java EE Tools Reporter: Aidyl Kareh <amkareh>
Component: jst.j2eeAssignee: Aidyl Kareh <amkareh>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: amkareh, ccc
Version: 3.2Flags: cbridgha: review+
Target Milestone: 3.2.2 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch
none
Updated Patch ccc: iplog+

Description Aidyl Kareh CLA 2010-09-28 09:50:00 EDT
Build Identifier: 

This bug is to get the fix into WTP 3.2.2 patches

+++ This bug was initially created as a clone of Bug #325644 +++

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-28 09:53:00 EDT
Created attachment 179741 [details]
Proposed Patch

Same patch as bug 325644.
Comment 2 Chuck Bridgham CLA 2010-09-29 10:15:57 EDT
approved
Comment 3 Aidyl Kareh CLA 2010-09-29 10:36:46 EDT
Created attachment 179853 [details]
Updated Patch

Patch has been updated to replace using the <String>.isEmpty() method, which
is Java 6 specific, with a Java 5 equivalent.

Patch for bug 325644 was also updated.
Comment 4 Carl Anderson CLA 2010-10-04 14:32:57 EDT
Committed to R3_2_2_patches