On Mon, 11 Aug 2003 06:44 am, Gregory Seidman wrote: > > Would someone please explain how to handle the simple example of a > directory/package tree full of .java source files to be built into a JAR? > Once I have that toehold, I think I can start learning the rest. >
Here is a complete and relatively simple example of a full build file to compile and build a jar. This particular example uses a set of external libraries in the build. If you don;t need that, you can drop out the lib.classpath related stuff. <project name="piston" default="jar"> <property name="src.dir" value="src"/> <property name="build.dir" value="build"/> <property name="lib.dir" value="lib"/> <property name="jar.dir" value="jar"/> <path id="lib.classpath"> <fileset dir="${lib.dir}"/> </path> <target name="compile"> <mkdir dir="${build.dir}"/> <javac srcdir="${src.dir}" destdir="${build.dir}" debug="on"> <classpath refid="lib.classpath"/> </javac> </target> <target name="jar" depends="compile"> <mkdir dir="${jar.dir}"/> <jar destfile="${jar.dir}/piston.jar"> <fileset dir="${build.dir}"/> <manifest> <attribute name="Main-Class" value="com.codefeed.piston.Piston"/> </manifest> </jar> </target> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]