<?xml version="1.0"?>
<project default="package" basedir=".">
- <property name="Name" value="Fop Servlet"/>
- <property name="name" value="fopservlet"/>
- <property name="version" value="0.2cvs"/>
- <!-- compiler switches -->
- <property name="build.compiler" value="classic"/>
- <property name="debug" value="off"/>
- <property name="optimize" value="on"/>
- <property name="deprecation" value="off"/>
- <!-- directories -->
- <property name="src.dir" value="./src"/>
- <property name="conf.dir" value="./conf"/>
- <property name="fop.lib.dir" value="../../lib"/>
- <property name="lib.dir" value="./lib"/>
- <property name="build.dir" value="./build"/>
- <property name="build.src" value="./build/src"/>
- <property name="build.dest" value="./build/classes"/>
- <property name="build.war" value="./build/war"/>
- <!-- stuff -->
- <property name="servlet.jar" value="servlet.jar"/>
- <property name="avalon-framework.jar" value="avalon-framework-cvs-20020806.jar"/>
- <path id="project.class.path">
- <pathelement location="${lib.dir}/${servlet.jar}"/>
- <pathelement location="${fop.lib.dir}/${avalon-framework.jar}"/>
- <pathelement location="${fop.lib.dir}/../build/fop.jar"/>
- <pathelement location="${fop.lib.dir}/batik.jar"/>
- </path>
- <!-- =================================================================== -->
- <!-- Initialization target -->
- <!-- =================================================================== -->
- <target name="init">
- <tstamp/>
- <filter token="version" value="${version}"/>
- <property name="year" value="1999-2002"/>
- <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
- <available property="servlet.present" file="${lib.dir}/${servlet.jar}"/>
- </target>
- <target name="servlet-check" depends="init" unless="servlet.present">
- <echo message="============================================================================="/>
- <echo message="servlet.jar is missing in the lib directory. Please get one and put it there."/>
- <echo message="============================================================================="/>
- </target>
- <!-- =================================================================== -->
- <!-- Prepares the build directory -->
- <!-- =================================================================== -->
- <target name="prepare" depends="init, servlet-check">
- <!-- create directories -->
- <echo message="Preparing the build directories"/>
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.dest}"/>
- </target>
- <!-- =================================================================== -->
- <!-- Compiles the source directory -->
- <!-- =================================================================== -->
- <target name="compile" depends="prepare">
- <echo message="Compiling the sources "/>
- <javac srcdir="${src.dir}" destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
- <classpath refid="project.class.path"/>
- </javac>
- </target>
- <!-- =================================================================== -->
- <!-- Creates the class package -->
- <!-- =================================================================== -->
- <target name="package" depends="compile">
- <echo message="Creating the WAR file"/>
- <war warfile="${build.dir}/fop.war" webxml="${conf.dir}/web.xml">
- <lib dir="${fop.lib.dir}">
- <include name="${avalon-framework.jar}"/>
- <include name="batik.jar"/>
- </lib>
- <lib dir="${fop.lib.dir}/../build">
- <include name="fop.jar"/>
- </lib>
- <classes dir="${build.dest}"/>
- </war>
- </target>
- <target name="all" depends="package"/>
- <!-- "all" target for us Makefile converts ;-) -->
- <!-- =================================================================== -->
- <!-- Clean targets -->
- <!-- =================================================================== -->
- <target name="clean" depends="init">
- <delete dir="${build.dir}"/>
- </target>
+ <property name="Name" value="Fop Servlet"/>
+ <property name="name" value="fopservlet"/>
+ <property name="version" value="0.2cvs"/>
+ <!-- compiler switches -->
+ <property name="build.compiler" value="classic"/>
+ <property name="debug" value="off"/>
+ <property name="optimize" value="on"/>
+ <property name="deprecation" value="off"/>
+ <!-- directories -->
+ <property name="src.dir" value="./src"/>
+ <property name="conf.dir" value="./conf"/>
+ <property name="fop.lib.dir" value="../../lib"/>
+ <property name="lib.dir" value="./lib"/>
+ <property name="build.dir" value="./build"/>
+ <property name="build.src" value="./build/src"/>
+ <property name="build.dest" value="./build/classes"/>
+ <property name="build.war" value="./build/war"/>
+ <!-- stuff -->
+ <property name="servlet.jar" value="servlet.jar"/>
+ <path id="project.class.path">
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${fop.lib.dir}">
+ <include name="avalon-framework*.jar"/>
+ <include name="batik*.jar"/>
+ </fileset>
+ <fileset dir="${fop.lib.dir}/../build">
+ <include name="fop.jar"/>
+ </fileset>
+ </path>
+ <!-- =================================================================== -->
+ <!-- Initialization target -->
+ <!-- =================================================================== -->
+ <target name="init">
+ <tstamp/>
+ <filter token="version" value="${version}"/>
+ <property name="year" value="1999-2002"/>
+ <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
+ <available property="servlet.present" classname="javax.servlet.Servlet" classpathref="project.class.path"/>
+ </target>
+ <target name="servlet-check" depends="init" unless="servlet.present">
+ <echo message="============================================================================="/>
+ <echo message="servlet.jar is missing in the lib directory. Please get one and put it there."/>
+ <echo message="============================================================================="/>
+ <fail message="Dependecy check failed."/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Prepares the build directory -->
+ <!-- =================================================================== -->
+ <target name="prepare" depends="init, servlet-check">
+ <!-- create directories -->
+ <echo message="Preparing the build directories"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.dest}"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Compiles the source directory -->
+ <!-- =================================================================== -->
+ <target name="compile" depends="prepare">
+ <echo message="Compiling the sources "/>
+ <javac srcdir="${src.dir}" destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
+ <classpath refid="project.class.path"/>
+ </javac>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Creates the class package -->
+ <!-- =================================================================== -->
+ <target name="package" depends="compile">
+ <echo message="Creating the WAR file"/>
+ <war warfile="${build.dir}/fop.war" webxml="${conf.dir}/web.xml">
+ <lib dir="${fop.lib.dir}">
+ <include name="avalon-framework*.jar"/>
+ <include name="batik*.jar"/>
+ </lib>
+ <lib dir="${fop.lib.dir}/../build">
+ <include name="fop.jar"/>
+ </lib>
+ <classes dir="${build.dest}"/>
+ </war>
+ </target>
+ <target name="all" depends="package"/>
+ <!-- "all" target for us Makefile converts ;-) -->
+ <!-- =================================================================== -->
+ <!-- Clean targets -->
+ <!-- =================================================================== -->
+ <target name="clean" depends="init">
+ <delete dir="${build.dir}"/>
+ </target>
</project>