I have source code directory that has files to create both an applet version
and a standalone application version. Most of the src files are needed by
both versions but some have files only necessary for one or the other. Is
there a tag in the build.xml file where I can specify a target and it will
compile just a applet version (ant applet) or a standalone (ant standalone)
and it will start compiling at the main file for each and not compile all
the files in the src directory. I am new to Ant and have read through much
of the documentation but haven't been able to find something taht will
satisfy my need. I used to just run javac and the file name to do it, but I
decided to finally move into the 21st century and automate this process.
TIA
This is what I have right now:
<project name="project" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="dist" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/project-${DSTAMP}.jar" basedir="${build}"/>
</target>
<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>