Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319311 - Jars exported as variable names instead of jar names
Summary: Jars exported as variable names instead of jar names
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5 P   Edit
Assignee: Aidyl Kareh CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 15:43 EDT by Aidyl Kareh CLA
Modified: 2010-07-27 08:20 EDT (History)
2 users (show)

See Also:
cbridgha: review+


Attachments
Proposed Patch (5.87 KB, patch)
2010-07-08 15:50 EDT, Aidyl Kareh CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aidyl Kareh CLA 2010-07-08 15:43:50 EDT
Build Identifier: WTP 3.0.5

If the user defines variables in their workspace that point to jar files, adds these variables to EAR project, and then Exports the EAR, the jar files are named with the variable names instead of the names of the jar files the variables represent. This file should be named as what the variable represents instead of with the variable name (i.e. if variable 'TEST_UTIL=C:\TestUtil.jar' is added to the Java EE Module Dependencies then the exported file should be named TestUtil.jar, not TEST_UTIL).

Steps to reproduce:
1) Create a new workspace variable that points to a jar file.
2) Right click the EAR project and select Properties > Java EE Module Dependencies.
3) Select "Add Variable" and add the variable to the EAR project.
4) Export the EAR project.
5) Open the resulting EAR project and you will see a "jar" file (no .jar extension though) named as the variable instead of the jar file it represents.

Reproducible: Always
Comment 1 Aidyl Kareh CLA 2010-07-08 15:50:48 EDT
Created attachment 173810 [details]
Proposed Patch

This patch removes the AddComponentToEnterpriseApplicationOp.getArchiveName() method override so that the default CreateReferenceComponentsOp.getArchiveName()  method is used instead. These changes make it so that the 'dependent-module' elements in the 'org.eclipse.wst.common.component' file now contain an 'archiveName' attribute. Some changes were also made to the EARVirtualComponent.getHardReferences() method so that it doesn't add the runtime path as prefix to the archive name if an archive name is already defined.
Comment 2 Chuck Bridgham CLA 2010-07-08 20:42:27 EDT
approved
Comment 3 Carl Anderson CLA 2010-07-27 08:20:28 EDT
Committed to R3_0_5_patches