ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mallampati, Suresh" <SMallamp...@erac.com>
Subject RE: jar task bug?? It is..
Date Thu, 20 Dec 2001 18:59:03 GMT
Hi,
According to the java spec, the manifest entry has two parts: the main
section and the file section. The class-path entry is part of the main
section. And the snippets you guys have attached is for file entries
section.
Name: fileName
entry: com
entry : com/mypackage
In this case, the first entry is ignored. But according to the spec, this is
not the desired behavior for Main section entries. So this infact is a bug.
If you guys have any questions regarding this, please refer to the java
tutorial on extension mechansim.
http://java.sun.com/docs/books/tutorial/ext/basics/download.html

<snips from jar file spec>
1. A JAR file manifest consists of a "main section" followed by a list of
sections for individual "JAR file entries", each separated by a newline.
Both the main section and individual sections follow the section syntax
specified above. They each have their own specific restrictions and rules. 

2. If there are multiple individual sections for the same file entry, the
attributes in these sections are merged. If a certain attribute have
different values in different sections, the last one is recognized. 
NOTE**: this refers to file entries and not main entries..
<snips from jar file specs>

	Please let me know your comments on this

Thanks
-Suresh



-----Original Message-----
From: Ylan Segal [mailto:ylan@digiworks.tv]
Sent: Thursday, December 20, 2001 12:40 PM
To: Ant Users List
Subject: RE: jar task bug??


>
>  Hi,
> I want to provide a manifest file to the jar task. One of my
> entries in the
> manifest file is a bit long.
> Class-Path: lib/asadfsdfsdfsd.jar lib/rdgdfsghsgsdfgsdfsg.jar
> lib/asrfdsfasfsdaf.jar
>
> The jar task, puts in new line characters and additional spaces to the
> entry..and this is causing problems.
> So I tried breaking that into multiple entries:
> Class-Path: lib/asadfsdfsdfsd.jar
> Class-Path: lib/rdgdfsghsgsdfgsdfsg.jar
> Class-Path: lib/asrfdsfasfsdaf.jar
>
> Now, when this manifest file is passed to the jar task, the first two
> entries are lost. And the jar's manifest shows only the third
> entry. Is this
> a bug..and is there some way to make the manifest file retain its
> entries..
>
I don't think it is a bug.
>From the JAR File Specification, included in the documentation for jdk1.3.1:

(Manifest Specification section: )
[snip]
If there are multiple individual sections for the same file entry, the
attributes in these sections are merged. If a certain attribute have
different values in different sections, the last one is recognized.
[snip]

And then there is other interesting stuff:

(Notes on Manifest and Signature Files)
[snip]
Line length:
No line may be longer than 72 bytes (not characters), in its UTF8-encoded
form. If a value would make the initial line longer than this, it should be
continued on extra lines (each starting with a single SPACE).
[snip]

So, it looks as if jar task is behaving as it should.

Ylan Segal.


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message