ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ellsworth <>
Subject Creating a manifest from a build.xml file
Date Fri, 04 Jan 2002 00:40:39 GMT
Hi, all.

If the property "manifest.main-class" is set, I want my jar to have 
that class specified in the Main-Class section of its manifest. 
Otherwise, I want it to just have the usual default manifest built.

Currently, my jar is build via:
   <target name="dist-debug" depends="compile-debug" 
description="Build debug jar">

I believe the following will work to create the manifest if I always 
know that the property manifest.main.class is set

   <property name="manifest.file" value=""/>
   <property name="manifest.main.class" value=""/>

   <target name="dist-debug-manifest" depends="compile-debug" 
description="Build debug jar with manifest">
         <attribute name="Main-Class" value="${manifest.main-class}"/>

I am not sure how to have the <manifest> section only happen if there 
is actually a manifest.

Does anyone else create a manifest on the fly this way?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message