<?xml version="1.0" encoding="UTF-8"?>

	
	
	<project name="examples" default="examples" basedir="../../..">
<target name="install">
<property value="${basedir}/../www/tutorial" name="tutorialsrc"/>
<property value="${basedir}/tutorial" name="tutorial"/>
<antcall target="examples"/>
</target>
<target name="examples">
<property value="${basedir}/bin" name="bin"/>
<property value="${basedir}/tutorial" name="tutorial"/>
<property value="${basedir}/examples" name="examples"/>
<property value="${basedir}/webapp" name="webapp"/>
<path id="classpath">
<pathelement location="${examples}"/>
<pathelement location="${bin}/iText.jar"/>
<pathelement location="${bin}/servlet.jar"/>
<pathelement location="${bin}/servlet.jar"/>
<pathelement location="${bin}/servlet.jar"/>
<pathelement location="${bin}/servlet.jar"/>
</path>
<available property="bin.dir.present" type="dir" file="${bin}"/>
<fail message="${basedir} has no subdirectory 'bin'" unless="bin.dir.present"/>
<available property="itext.jar.present" type="file" file="${bin}/iText.jar"/>
<fail message="You need the iText.jar in this directory: ${bin}" unless="itext.jar.present"/>
<available file="${bin}/servlet.jar" type="file" property="servlet.jar.present"/>
<fail unless="servlet.jar.present" message="You need servlet.jar in this directory ${bin}"/>
<available file="${bin}/servlet.jar" type="file" property="servlet.jar.present"/>
<fail unless="servlet.jar.present" message="You need servlet.jar in this directory ${bin}"/>
<available file="${bin}/servlet.jar" type="file" property="servlet.jar.present"/>
<fail unless="servlet.jar.present" message="You need servlet.jar in this directory ${bin}"/>
<available file="${bin}/servlet.jar" type="file" property="servlet.jar.present"/>
<fail unless="servlet.jar.present" message="You need servlet.jar in this directory ${bin}"/>
<javac verbose="false" destdir="${examples}" srcdir="${examples}">
<classpath refid="classpath"/>
<include name="com/lowagie/examples/general/webapp/*.java"/>
</javac>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<mkdir dir="${webapp}/ROOT/WEB-INF/lib"/>
<copy file="${bin}/iText.jar" todir="${webapp}/ROOT/WEB-INF/lib" overwrite="no"/>
<mkdir dir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp"/>
<copy todir="${webapp}/ROOT/WEB-INF/classes/com/lowagie/examples/general/webapp" overwrite="yes">
<fileset dir="${examples}/com/lowagie/examples/general/webapp">
<include name="*.class"/>
</fileset>
</copy>
<copy file="${tutorialsrc}/general/webapp/index.jsp" todir="${webapp}/ROOT" overwrite="yes"/>
<copy todir="${webapp}/ROOT" overwrite="yes">
<fileset dir="${tutorialsrc}/general/webapp">
<include name="*.jsp"/>
</fileset>
</copy>
<copy todir="${tutorial}/general/webapp" overwrite="yes">
<fileset dir="${tutorialsrc}/general/webapp">
<include name="*.jsp"/>
<include name="web.xml"/>
</fileset>
</copy>
<war destfile="${webapp}/ROOT.war" basedir="${webapp}/ROOT" webxml="${tutorialsrc}/general/webapp/web.xml"/>
<delete>
<fileset includes="**/*.class" dir="${examples}"/>
</delete>
</target>
</project>
	
	
	
	
	
	
	
	
	
	
	
	

	

