Raja Nagendra Kumar wrote:
Hi,

Thanks for the reply. My reply in-line


----- Original Message ----- From: "Steve Loughran" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, April 12, 2005 4:41 PM
Subject: Re: Ant Jar doubt




Raja Nagendra Kumar wrote:

Hi,

When ever we jar I see in the manifest 'Ant-Version: Apache Ant 1.6.2'

this

line. Could any one tell me how to avoid this.

I dont know if there is a way to do this (yet)



Is there any custom tasks written by any one which could be used for this
purpose.

no, but it isnt needed,


in manifest. My observation here is sqence is altered.

I dont believe that code should depend on the order; its part of the manifest specification. We'd only be encouraging bad practices if enabled.


This is because, my client (J2ME Game publisher) is asking for this order..


Well, they -or the telephone provider- are not using the specification correctly:
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files


"The order of individual manifest entries is not significant."

If it is their code, their code is broken. If it is a particular phone. I'd like to know which one. Is it a motorola phone?

Any case why should the oder be manipulated by the jar command. Why does it
not take the things in way it has been provided ..

Because there are lots of things the task does with manifest fixup, such as correcting over-long lines using the official wrapping rules, and other aspects of the manifest specification. We intermittently get complaints about the ant code not understanding how to wrap lines or otherwise set up JAR files, but you have to remember: Ant probably creates the majority of the JAR files on the planet for production applications. We follow the specs to the letter, and have to be strict.


Also, re-ordering entries stops people writing code which makes assumptions about manifest entry order. Clearly, someone downstream from you has done exactly that, which is why you are suffering. But we don't do it deliberatetly, it's probably just hashTable at work.

If you don't want Ant to do your manifest

1. write it by hand
2. use the <zip> task to create the JAR
3. import the manifest at META-INF/manifest.mf

That's all. no need for custom tasks. I'd recommend you use <manifest> to create a stub manifest that you patch by hand. That reduces the likelihood of the manifest being wrong.

There are some extra ant tasks for j2me listed on our external task list:
http://ant.apache.org/external.html

The antic one looks like it does special J2ME stuff.

-Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to