You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by THUFIR HAWAT <th...@mail.com> on 2005/01/27 13:26:17 UTC
include source with jar
I'd like to change the .jar file created to include all the source code, but can't find the syntax. How do I do that, pls?
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="monsters" default="package">
<property name="outputDir" value="C:\java\classes\" />
<property name="sourceDir"
value="C:\java\sources\atreides\monsters\" />
<property name="mainClass" value="TestDriveMonsters" />
<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}"
debug="on" />
</target>
<target name="manifest" depends="compile">
<manifest file="${outputDir}/MANIFEST.MF">
<attribute name="Main-Class"
value="atreides.monsters.${mainClass}" />
</manifest>
</target>
<target name="package" depends="manifest">
<jar jarfile="${outputDir}/${mainClass}.jar"
basedir="${outputDir}"
manifest="${outputDir}/MANIFEST.MF" />
</target>
</project>
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org