Well I have this part so far:
<target name="compileStand" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<delete dir="${build}/com"/>
<javac srcdir="${src}" destdir="${build}" >
<include name="com/nex/mwt/app/MWTApp.java" />
</javac>
</target>When this file (com/nex/mwt/app/MWTApp.java) gets compiled I also want all the files that this file depends on to also be compiled. How can I do this? ----- Original Message ----- From: "Sujan Digumarti" <[EMAIL PROTECTED]> To: "'Ant Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, April 09, 2002 2:48 AM Subject: RE: Ant start on a given file > You can create two targets in the build.xml file for this purpose and > call them accordingly > > for ex: > $ ant <target name for building applet> > $ ant <target name for building application> > > For compiling only specific files or excluding specific files > you can use the include and exclude tags with javac > Have a look at the docs for javac > > Rgds, > Sujan > > -----Original Message----- > From: comp boy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 09, 2002 9:48 AM > To: [EMAIL PROTECTED] > Subject: Ant start on a given file > > > 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]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
