inline manifest for build.xml

H

hawat.thufir

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top