This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 12521 - When trying to create jar files with ant, manifest files do not behave
Summary: When trying to create jar files with ant, manifest files do not behave
Status: CLOSED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-31 07:42 UTC by navneet
Modified: 2001-07-20 20:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The build file with the jar task commented and the exec command enabled. (1.47 KB, text/plain)
2001-07-20 20:11 UTC, navneet
Details
Zip file containing the test case (1.17 KB, application/octet-stream)
2001-07-11 13:13 UTC, navneet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description navneet 2001-05-31 07:42:09 UTC
I tried working with the jar task of ant supplied with netbeans 3.2 release - 
build 38. I will attach the build file that i have made for the test cases.

When I try to open this jar file in another java program, I get a null 
reference trying to get the manifest file. Basically, the JarInputStream does 
not recognize the manifest file, though it has been correctly included in the 
jar file. Though, if I use the exec task with the jar command, it works fine.

Please advise.
Comment 1 navneet 2001-05-31 07:43:12 UTC
Created attachment 1472 [details]
The build file with the jar task commented and the exec command enabled.
Comment 2 Jesse Glick 2001-06-18 10:59:00 UTC
Plenty of people, including the NetBeans project itself, use the <jar> task
without problems, inside or outside the IDE. So if it is not working for you,
you must provide a small, self-contained test case that can reproduce your
specific problem.

BTW: suggest use of <pathelement location="..."/> for your complex
space-containing classpath entries, and avoiding use of <arg line="..."/>.
Comment 3 Milan Kubec 2001-06-29 12:35:59 UTC
Verified.
Comment 4 navneet 2001-07-11 13:13:35 UTC
Created attachment 1854 [details]
Zip file containing the test case
Comment 5 navneet 2001-07-11 13:14:10 UTC
I have added the test case. Notice that the entries displayed are 
not the same as that in the Jar file.
Comment 6 _ mruflin 2001-07-11 14:16:33 UTC
I am not able to reproduce this.
With your manifest file I got 0 entries, BUT 5 Attributes.

The whole Manifest looks like:

Manifest-Version: 1.0   # is also an attribute
Attribute1: value1
Attribute2: value2
Attribute3: value3
                        # blank line
Name: Entry1
Attribute14: attribute1 of entry1
Attribute15: attribute2 of entry2
                        # blank line
Name: Entry2
...

This works for me. I cannot figure out what the problem could be, 
sorry.
Comment 7 navneet 2001-07-12 08:01:49 UTC
Sorry for the trouble. 
Comment 8 navneet 2001-07-12 08:02:05 UTC
Not a valid problem.