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
<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