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. Anyway thanks for your quick response, your file i/o stuff was groovier than my java-ish solution so I left yours in. Adam Murdoch-2 wrote: > > > > On 5/02/10 11:30 PM, wpfeiffe wrote: >> How do I write out the manifest to my src/main/resources dir such that >> the >> IDE (in my case Idea, but it could be any IDE) can package it when it >> does >> its own exploded deployment. >> >> > > There is a 'manifest' property, which defines the manifest to be > included in the jar. You can write it out to a file using something like: > > file('src/main/resources/META-INF/MANIFEST.MF').withOutputStream { outstr > -> > manifest.createManifest().write(outstr) > } > > > -- > Adam Murdoch > Gradle Developer > http://www.gradle.org > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > -- View this message in context: http://old.nabble.com/How-to-write-out-manifest.mf-for-external-IDE-tp27467119p27512399.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
