Bug 220257 - [jar exporter] ANT build file does not create Class-Path Entry in Manifest
Summary: [jar exporter] ANT build file does not create Class-Path Entry in Manifest
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Benno Baumgartner CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-02-25 14:12 EST by Ferenc Hechler CLA
Modified: 2008-09-04 06:18 EDT (History)
2 users (show)

See Also:


Attachments
fix for missing Class-Path entry (9.09 KB, patch)
2008-02-25 14:12 EST, Ferenc Hechler CLA
no flags Details | Diff
fix for missing Class-Path entry (10.29 KB, patch)
2008-03-04 10:23 EST, Ferenc Hechler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ferenc Hechler CLA 2008-02-25 14:12:57 EST
Created attachment 90673 [details]
fix for missing Class-Path entry

Build ID: I20080219-1124

Steps To Reproduce:
1. File > Export > Java/Runnable JAR File 
2. Wizard Page "Runnable JAR File Specification" shows up
3. check "save ANT File"
4. Click "Finish"

The created build.xml does not create a Class-Path entry with the value "."

More information:
The Jar file created with the wizard has the following Entry in its Manifest:
[---]
Class-Path: .
[---]

The Jar file created via the saved ANT script does not contain this Attribute.

This entry is not neccessary, but property files or other resources outside of the JAR file will not be found.
Comment 1 Ferenc Hechler CLA 2008-02-25 14:17:37 EST
Another Bug is fixed in the Path, which has no relevance at the moment.
JarWriter4 supports adding content from Jar-Files. If the destination-Jar is not compressed the CRC Value of the source is reused. Because of a typo the CompressedSize was set instead of the CRC:

old:
newEntry.setCompressedSize(zipEntry.getCrc());

new:
newEntry.setCrc(zipEntry.getCrc());

It has no relevance, because the default for creating Jars is "compressed" and it can not changed in the "Runnable Jar File" Export wizard.

For both patches Testcases have been added.

Comment 2 Ferenc Hechler CLA 2008-02-26 03:03:17 EST
the patch contains an uneccessary piece of code

ui/org/eclipse/jdt/ui/tests/jarexport/FatJarExportTests.java
line 205:  data.setCompress(false);

will remove this with the next patch.


Comment 3 Ferenc Hechler CLA 2008-03-04 10:23:41 EST
Created attachment 91518 [details]
fix for missing Class-Path entry

removed unneccessary line, added contribution comment
Comment 4 Benno Baumgartner CLA 2008-03-11 10:42:01 EDT
fixed > N20080310-0100

Thanks Ference