On 9/02/10 8:17 PM, wpfeiffe wrote:
I had tried this method prior to posting my initial message but it produced
an empty MANIFEST.MF file where the same build script produces a jar with
the properly populated MANIFEST.MF.  Looking at the java.util.jar.Manifest
class, there didn't seem to be much to it.  Then I stumbled on this blog
post:

http://tech.puredanger.com/2008/01/07/jar-manifest-api/
http://tech.puredanger.com/2008/01/07/jar-manifest-api/

The short of it is that you need to include the 'Manifest-Version': '1.0'
attribute:value pairing or the Manifest class ignores your other attributes
and produces an empty manifest. Apparently this is undocumented behavior.

In Gradle 0.8, the 'Manifest-Version' attribute is added as the jar is being built. This has changed in trunk, where the attribute is added when the manifest object is constructed. So, in the Gradle 0.9 release, writing the manifest to a file should work fine.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to