By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,825 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,825 IT Pros & Developers. It's quick & easy.

inline manifest for build.xml

P: n/a
an ant build.xml file:

<project name="XHTML" default="package2">

<import file="properties.xml" />

<target name="clean">
<delete dir="${outputDir}" />
</target>

<target name="prepare" depends="clean">
<mkdir dir="${outputDir}" />
</target>

<target name="compile" depends="prepare">
<javac srcdir="${sourceDir}"
destdir="${outputDir}"
classpath="${jarPath}"
/>
</target>

<target name="manifest1" depends="compile">
<manifest file="${outputDir}/MANIFEST.MF">
<attribute name="Main-Class" value="${pkgPath}${mainClass1}" />
</manifest>
</target>

<target name="manifest2" depends="manifest1">
<manifest file="${outputDir}/MANIFEST.MF">
<attribute name="Main-Class" value="${pkgPath}${mainClass2}" />
</manifest>
</target>

<target name="package1" depends="manifest2">
<jar
destfile="${outputDir}/${mainClass1}.jar"
basedir="${outputDir}">
</jar>
</target>

<target name="package2" depends="package1">
<jar
destfile="${outputDir}/${mainClass2}.jar"
basedir="${outputDir}"
manifest="${outputDir}/MANIFEST.MF"
/>
</target>
</project>

I'm trying follow the inline manifest example:

<jar destfile="test.jar" basedir=".">
<include name="build"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<section name="common/class1.class">
<attribute name="Sealed" value="false"/>
</section>
</manifest>
</jar>

from <http://ant.apache.org/manual/CoreTasks/jar.html>,
so that package1 uses manifest1, though.
thanks,

Thufir

Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.