ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Salmon ...@formulae.org>
Subject Re: jar task, manifest issue
Date Tue, 22 Oct 2002 19:15:02 GMT
On Tue, Oct 22, 2002 at 08:22:09AM +0200, Stefan Bodewig wrote:
> On Mon, 21 Oct 2002, Michael Salmon <ms@formulae.org> wrote:
> 
> > First off it would copy the MANIFEST.MF and rearrange the data in it
> > and strip CRLF line feeds with unix style line feeds.
> 
> order within a section is insignificant and the line ends are correct
> - all according to the manifest specification.
> 
> Is there a real problem with the rewritten manifest - apart from
> aesthetics, I mean.

I am building applications for j2me devices. Some of the device runtimes
simply suck. There are problems in motorola phones for example
where .jad file data (which is a text file nearly identical to a manifest)
is needed to be in a specific order. Though I havent found it to be
the case for manifest.mf files, it is easily possible that a phone could
screw up. I dont see the reason why the data from a manifest is read
into a hash and print it out (assuming that's how it's done) rather then 
simply copy the file retaining order.
Simply put: if I say I want to use file a for my manifest, changing that file
in any way makes it a' which is not what I asked the tool to do.

> > "[jar] File
> > /usr/home/ms/src/java/j2me/bubble/.build/classes/META-INF/MANIFEST.MF
> > includes a META-INF/MANIFEST.MF which will be ignored.
> 
> This means that you are including your manifest twice, once via the
> manifest attribute and once as part of the files that are to be added
> to the archive.  Exclude it from the later part.

Yes, ant does create a default manifest when I use the javac task with
the modern compiler. Then when I go to jar it and want to replace the
manifest it gives me an unexpected error.
I am only adding my manifest once. 
I could delete the file that ant creates for me before I jar but I think
that's wrong, it should only create the default manifest.mf file if I dont
explicitly add one to the jar.

> > To include this file, set filesetManifest to a value other than
> > 'skip'."
> 
> This message should be gone in 1.5.1.

I am going off what is in cvs head.

> > The setFilesetManifest method is commented out though making setting
> > this impossible.
> 
> It is going to come back in 1.6, there have been some problems with
> the implementation that we couldn't resolve before we released 1.5.

I think the default behavior when a user simply specifies a manifest
attribute to <jar> is that it will skip. Currently "skip" is unsettable
and not set by default (as the code says). I could easily give you
a patch to set that value but I think you could code it as easily
as inspecting and adding my patch.

> Stefan

ms

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


Mime
View raw message