<!--
 ! Licensed to the Apache Software Foundation (ASF) under one or more
 ! contributor license agreements.  See the NOTICE file distributed with
 ! this work for additional information regarding copyright ownership.
 ! The ASF licenses this file to You under the Apache License, Version 2.0
 ! (the "License"); you may not use this file except in compliance with
 ! the License.  You may obtain a copy of the License at
 !
 !      http://www.apache.org/licenses/LICENSE-2.0
 !
 ! Unless required by applicable law or agreed to in writing, software
 ! distributed under the License is distributed on an "AS IS" BASIS,
 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ! See the License for the specific language governing permissions and
 ! limitations under the License.
 !-->
<project default="dist" name="PDFBox" basedir=".">

    <!-- Use the following file to alter any of the below properties -->
    <property file="build.properties" />
    <property file="build-local.properties" />
    <property environment="env"/>

    <property name="build.compiler" value="modern" />

    <property name="download.dir" value="download" />
    <property name="jar.dir" value="external" />
    <property name="tool.dir" value="tools" />
    <property name="bin.dir" value="bin" />

    <property name="project.version" value="1.8.11" />

    <!-- pdfbox -->
    <property name="pdfbox.project.name" value="pdfbox"/>
    <property name="pdfbox.release.name" value="${pdfbox.project.name}-${project.version}" />
    <property name="pdfbox.src.dir" value="src/main/java" />
    <property name="pdfbox.target.dir" value="target" />
    <property name="pdfbox.dest.dir" value="${pdfbox.target.dir}/classes" />
    <property name="pdfbox.test.dir" value="src/test/java" />
    <property name="pdfbox.testfiles.dir" value="/src/test/resources" />
    <property name="pdfbox.resources.dir" value="src/main/resources" />
    <property name="pdfbox.checkstyle.config" value="../pdfbox-checkstyle.xml" />

    <!-- fontbox -->
    <property name="fontbox.project.name" value="fontbox"/>
    <property name="fontbox.release.name" value="${fontbox.project.name}-${project.version}" />
    <property name="fontbox.src.dir" value="../${fontbox.project.name}/src/main/java" />
    <property name="fontbox.target.dir" value="../${fontbox.project.name}/target" />
    <property name="fontbox.jar" value="${fontbox.target.dir}/${fontbox.release.name}.jar" />
    <property name="fontbox.dest.dir" value="${fontbox.target.dir}/classes" />
    <property name="fontbox.test.dir" value="../${fontbox.project.name}/src/test/java" />
    <property name="fontbox.testfiles.dir" value="../${fontbox.project.name}/src/test/resources" />

    <!-- jempbox -->
    <property name="jempbox.project.name" value="jempbox"/>
    <property name="jempbox.release.name" value="${jempbox.project.name}-${project.version}" />
    <property name="jempbox.src.dir" value="../${jempbox.project.name}/src/main/java" />
    <property name="jempbox.target.dir" value="../${jempbox.project.name}/target" />
    <property name="jempbox.jar" value="${jempbox.target.dir}/${jempbox.release.name}.jar" />
    <property name="jempbox.dest.dir" value="${jempbox.target.dir}/classes" />
    <property name="jempbox.test.dir" value="../${jempbox.project.name}/src/test/java" />
    <property name="jempbox.testfiles.dir" value="../${jempbox.project.name}/src/test/resources" />

    <property name="maven.repo1" value="http://repo1.maven.org/maven2" />
    <property name="maven.repo2" value="http://repo2.maven.org/maven2" />

    <property name="bcprov.name" value="bcprov-jdk15-1.44" />
    <property name="bcprov.url" value="${maven.repo2}/org/bouncycastle/bcprov-jdk15/1.44/${bcprov.name}.jar" />
    <property name="bcprov.jar" value="${jar.dir}/${bcprov.name}.jar" />

    <property name="bcmail.name" value="bcmail-jdk15-1.44" />
    <property name="bcmail.url" value="${maven.repo2}/org/bouncycastle/bcmail-jdk15/1.44/${bcmail.name}.jar" />
    <property name="bcmail.jar" value="${jar.dir}/${bcmail.name}.jar" />

    <property name="junit.name" value="junit-4.8.1" />
    <property name="junit.url" value="${maven.repo2}/junit/junit/4.8.1/${junit.name}.jar" />
    <property name="junit.jar" value="${jar.dir}/${junit.name}.jar" />

    <property name="logging.name" value="commons-logging-1.1.1" />
    <property name="logging.url" value="${maven.repo1}/commons-logging/commons-logging/1.1.1/${logging.name}.jar" />
    <property name="logging.jar" value="${jar.dir}/${logging.name}.jar" />

    <property name="icu4j.name" value="icu4j-3.8" />
    <property name="icu4j.url" value="${maven.repo1}/com/ibm/icu/icu4j/3.8/${icu4j.name}.jar" />
    <property name="icu4j.jar" value="${jar.dir}/${icu4j.name}.jar" />

    <property name="checkstyle.url" value="${maven.repo2}/checkstyle/checkstyle/4.4/checkstyle-4.4.jar" />
    <property name="checkstyle.jar" value="${tool.dir}/checkstyle.jar" />
    <property name="beanutils.url" value="${maven.repo2}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar" />
    <property name="beanutils.jar" value="${tool.dir}/commons-beanutils.jar" />
    <property name="antlr.url" value="${maven.repo2}/antlr/antlr/2.7.6/antlr-2.7.6.jar" />
    <property name="antlr.jar" value="${tool.dir}/antlr.jar" />

    <property name="testoutput.dir" value="${pdfbox.target.dir}/test-output"/>
    <property name="testoutput-ext.dir" value="${pdfbox.target.dir}/test-output-ext"/>
    <property name="testinput-ext.dir" value="${pdfbox.target.dir}/test-input-ext"/>

    <property name="adobefiles.url" value="${maven.repo2}/com/adobe/pdf/pcfi/2010.08.09/pcfi-2010.08.09.jar"/>
    <property name="adobefiles.jar" value="${download.dir}/pcfi-2010.08.09.jar"/>

    <property name="file" value=""/>

    <!--.NET properties -->
    <property name="ikvm.dir" value="."/>
    <property name="ikvmc" value="${ikvm.dir}/bin/ikvmc.exe"/>

    <path id="pdfbox.build.classpath">
        <pathelement path="${bcprov.jar}" />
        <pathelement path="${bcmail.jar}" />
        <pathelement path="${bcpkix.jar}" />
        <pathelement path="${icu4j.jar}" />
        <pathelement path="${logging.jar}" />
        <pathelement path="${junit.jar}" />
        <pathelement path="${fontbox.jar}" />
        <pathelement path="${jempbox.jar}" />
        <pathelement path="${pdfbox.dest.dir}" />
        <pathelement path="${pdfbox.resources.dir}" />
    </path>

    <path id="fontbox.build.classpath">
        <pathelement path="${logging.jar}" />
        <pathelement path="${junit.jar}" />
        <pathelement path="${fontbox.dest.dir}" />
        <pathelement path="${fontbox.resources.dir}" />
    </path>

    <path id="jempbox.build.classpath">
        <pathelement path="${logging.jar}" />
        <pathelement path="${junit.jar}" />
        <pathelement path="${jempbox.dest.dir}" />
        <pathelement path="${jempbox.resources.dir}" />
    </path>

    <path id="checkstyle.classpath">
        <pathelement path="${checkstyle.jar}" />
        <pathelement path="${beanutils.jar}" />
        <pathelement path="${logging.jar}" />
        <pathelement path="${antlr.jar}" />
    </path>

    <target name="pdfbox.clean" description="Remove all generated files">
        <delete dir="${pdfbox.target.dir}"/>
        <delete dir="${bin.dir}"/>
        <delete file="checkstyle.cache" />
        <delete dir="${testoutput.dir}"/>
        <delete dir="${testoutput-ext.dir}"/>
    </target>

    <target name="fontbox.clean" description="Remove all generated files">
        <delete dir="${fontbox.target.dir}"/>
    </target>

    <target name="jempbox.clean" description="Remove all generated files">
        <delete dir="${jempbox.target.dir}"/>
    </target>

    <target name="pdfbox.init">
        <mkdir dir="${pdfbox.dest.dir}"/>
        <mkdir dir="${bin.dir}" />
        <mkdir dir="${testoutput.dir}" />
        <mkdir dir="${testoutput.dir}/rendering" />
        <mkdir dir="${testoutput-ext.dir}" />
        <mkdir dir="${testoutput-ext.dir}/rendering" />
    </target>

    <target name="fontbox.init">
        <mkdir dir="${fontbox.dest.dir}"/>
    </target>

    <target name="jempbox.init">
        <mkdir dir="${jempbox.dest.dir}"/>
    </target>

    <target name="pdfbox.compile" depends="fontbox.package,jempbox.package,pdfbox.init,get.adobefiles"
            description="Compile Java source files">
        <!-- required encoding flag to be able to build using ibm-jdk on redhat ES-->
        <javac srcdir="${pdfbox.src.dir}" destdir="${pdfbox.dest.dir}"
               target="1.5" source="1.5" debug="on" deprecation="on"
               classpathref="pdfbox.build.classpath" encoding="ISO-8859-1"/>
        <javac srcdir="${pdfbox.test.dir}" destdir="${pdfbox.dest.dir}"
               target="1.5" source="1.5" debug="on" deprecation="on"
               classpathref="pdfbox.build.classpath" encoding="ISO-8859-1"/>
    </target>

    <target name="fontbox.compile" depends="fontbox.init"
            description="Compile Java source files">
        <!-- required encoding flag to be able to build using ibm-jdk on redhat ES-->
        <javac srcdir="${fontbox.src.dir}" destdir="${fontbox.dest.dir}"
               target="1.5" source="1.5" debug="on" deprecation="on"
               classpathref="fontbox.build.classpath" encoding="ISO-8859-1"/>
        <javac srcdir="${fontbox.test.dir}" destdir="${fontbox.dest.dir}"
               target="1.5" source="1.5" debug="on" deprecation="on"
               classpathref="fontbox.build.classpath" encoding="ISO-8859-1"/>
    </target>

    <target name="jempbox.compile" depends="jempbox.init"
            description="Compile Java source files">
        <!-- required encoding flag to be able to build using ibm-jdk on redhat ES-->
        <javac srcdir="${jempbox.src.dir}" destdir="${jempbox.dest.dir}"
               target="1.5" source="1.5" debug="on" deprecation="on"
               classpathref="jempbox.build.classpath" encoding="ISO-8859-1"/>
        <javac srcdir="${jempbox.test.dir}" destdir="${jempbox.dest.dir}"
               target="1.5" source="1.5" debug="on" deprecation="on"
               classpathref="jempbox.build.classpath" encoding="ISO-8859-1"/>
    </target>

    <target name="test" depends="testextract,test-junit,testimage" description="Run all the junit tests"/>

    <target name="find.adobefiles">
        <available property="adobefiles.found" file="${dest.dir}/org/apache/pdfbox/resources/cmap"/>
    </target>

    <target name="get.adobefiles"
            unless="adobefiles.found" depends="find.adobefiles"
            description="Download and unpack afm and cmap files from Adobe">
        <antcall target="downloadfile">
            <param name="sourcefile" value="${adobefiles.url}"/>
            <param name="destfile" value="${adobefiles.jar}"/>
        </antcall>
        <unjar src="${adobefiles.jar}" dest="${pdfbox.dest.dir}/org/apache/pdfbox/resources/afm">
            <patternset>
                <include name="com/adobe/pdf/pcfi/afm/*.afm"/>
            </patternset>
            <mapper type="flatten"/>
        </unjar>
        <unjar src="${adobefiles.jar}" dest="${pdfbox.dest.dir}/org/apache/pdfbox/resources">
            <patternset>
                <include name="com/adobe/pdf/pcfi/glyphlist.txt"/>
            </patternset>
            <mapper type="flatten"/>
        </unjar>
    </target>

    <target name="testextract" depends="clean,pdfbox.compile" description="Test text extraction">
        <junit printsummary="off" fork="on" dir=".">
            <jvmarg value="-Xmx1024M"/>
            <jvmarg value="-Xms512M"/>
            <sysproperty key="org.apache.pdfbox.util.TextStripper.file" value="${file}"/>
            <sysproperty key="java.util.logging.config.file"
                         value="src/test/resources/logging.properties"/>
            <classpath>
                <pathelement path="${junit.jar}" />
                <pathelement path="${logging.jar}" />
                <pathelement path="${bcprov.jar}" />
                <pathelement path="${bcmail.jar}" />
                <pathelement path="${icu4j.jar}" />
                <pathelement path="${pdfbox.dest.dir}"/>
                <pathelement path="${pdfbox.resources.dir}" />
                <pathelement path="${fontbox.dest.dir}"/>
                <pathelement path="${jempbox.dest.dir}"/>
            </classpath>
            <formatter usefile="false" type="plain" />
            <test name="org.apache.pdfbox.util.TestTextStripper" />
        </junit>
    </target>

    <target name="testimage" depends="clean,pdfbox.compile" description="Test image rendering">
        <junit printsummary="off" fork="on" dir="."  >
            <jvmarg value="-Xmx1024M"/>
            <jvmarg value="-Xms512M"/>

            <sysproperty key="org.apache.pdfbox.util.TextStripper.file" value="${file}"/>
            <sysproperty key="java.util.logging.config.file"
                         value="src/test/resources/logging.properties"/>
            <classpath>
                <pathelement path="${junit.jar}" />
                <pathelement path="${logging.jar}" />
                <pathelement path="${bcprov.jar}" />
                <pathelement path="${bcmail.jar}" />
                <pathelement path="${icu4j.jar}" />
                <pathelement path="${pdfbox.dest.dir}"/>
                <pathelement path="${pdfbox.resources.dir}" />
                <pathelement path="${fontbox.dest.dir}"/>
                <pathelement path="${jempbox.dest.dir}"/>
            </classpath>
            <formatter usefile="false" type="plain" />
            <test name="org.apache.pdfbox.util.TestPDFToImage" />
        </junit>
    </target>

    <target name="test-junit" depends="clean,pdfbox.compile" description="run junit tests">
        <junit printsummary="off" fork="on" dir=".">
            <sysproperty key="java.util.logging.config.file"
                         value="src/test/resources/logging.properties"/>
            <classpath>
                <pathelement path="${junit.jar}" />
                <pathelement path="${logging.jar}" />
                <pathelement path="${bcprov.jar}" />
                <pathelement path="${bcmail.jar}" />
                <pathelement path="${pdfbox.dest.dir}"/>
                <pathelement path="${pdfbox.resources.dir}" />
                <pathelement path="${fontbox.dest.dir}"/>
                <pathelement path="${jempbox.dest.dir}"/>
            </classpath>
            <formatter usefile="false" type="plain" />
            <test name="org.apache.pdfbox.TestAll" />
        </junit>
    </target>

    <target name="testexist">
        <echo message="Testing for ${destfile}" level="debug"/>
        <available file="${destfile}" property="exist"/>
    </target>
    <target name="downloadfile" unless="exist" depends="testexist">
        <dirname property="destdir" file="${destfile}"/>
        <mkdir dir="${destdir}"/>
        <get src="${sourcefile}" dest="${destfile}"/>
    </target>

    <target name="find.checkstyle">
        <available property="checkstyle.found"
                   classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
                   classpathref="checkstyle.classpath"/>
    </target>

    <target name="get.checkstyle"
            unless="checkstyle.found" depends="find.checkstyle">
        <antcall target="downloadfile">
            <param name="sourcefile" value="${checkstyle.url}"/>
            <param name="destfile" value="${checkstyle.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${beanutils.url}"/>
            <param name="destfile" value="${beanutils.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${antlr.url}"/>
            <param name="destfile" value="${antlr.jar}"/>
        </antcall>
    </target>

    <target name="checkstyle" depends="pdfbox.compile,get.checkstyle">
        <!-- This doesn't work when run from netbeans for some reason -->
        <taskdef name="checkstyle"
                 classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
                 classpathref="checkstyle.classpath" />
        <checkstyle config="${pdfbox.checkstyle.config}"
                    classpathref="checkstyle.classpath"
                    failOnViolation="false">
            <fileset dir="${pdfbox.src.dir}" />
        </checkstyle>
    </target>

    <target name="get.externallibs.pdfbox">
        <antcall target="downloadfile">
            <param name="sourcefile" value="${bcmail.url}"/>
            <param name="destfile" value="${bcmail.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${bcprov.url}"/>
            <param name="destfile" value="${bcprov.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${junit.url}"/>
            <param name="destfile" value="${junit.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${logging.url}"/>
            <param name="destfile" value="${logging.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${icu4j.url}"/>
            <param name="destfile" value="${icu4j.jar}"/>
        </antcall>
    </target>

    <target name="get.externallibs.fontbox">
        <antcall target="downloadfile">
            <param name="sourcefile" value="${junit.url}"/>
            <param name="destfile" value="${junit.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${logging.url}"/>
            <param name="destfile" value="${logging.jar}"/>
        </antcall>
    </target>

    <target name="get.externallibs.jempbox">
        <antcall target="downloadfile">
            <param name="sourcefile" value="${junit.url}"/>
            <param name="destfile" value="${junit.jar}"/>
        </antcall>
        <antcall target="downloadfile">
            <param name="sourcefile" value="${logging.url}"/>
            <param name="destfile" value="${logging.jar}"/>
        </antcall>
    </target>

    <target name="pdfbox.package" depends="get.externallibs.pdfbox,pdfbox.compile" description="Package pdfbox into a jar file">
        <propertyfile file="${pdfbox.resources.dir}/org/apache/pdfbox/resources/pdfbox.version">
            <entry  key="pdfbox.version" value="${pdfbox.release.name}"/>
        </propertyfile>

        <jar jarfile="./${pdfbox.target.dir}/${pdfbox.release.name}.jar">
            <fileset dir="${pdfbox.dest.dir}"/>
            <fileset dir="${pdfbox.resources.dir}"/>
            <metainf dir="." includes="*.txt"/>
            <manifest>
                <attribute name="Built-By" value="${user.name}"/>
                <attribute name="Implementation-Title" value="Apache PDFBox"/>
                <attribute name="Implementation-Version" value="${project.version}"/>
                <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
                <attribute name="Implementation-URL" value="http://pdfbox.apache.org/"/>
            </manifest>
        </jar>
    </target>

    <target name="fontbox.package" depends="get.externallibs.fontbox,fontbox.compile" description="Package fontbox into a jar file">
        <jar jarfile="${fontbox.jar}">
            <fileset dir="${fontbox.dest.dir}"/>
            <metainf dir="." includes="*.txt"/>
            <manifest>
                <attribute name="Built-By" value="${user.name}"/>
                <attribute name="Implementation-Title" value="Apache FontBox"/>
                <attribute name="Implementation-Version" value="${project.version}"/>
                <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
                <attribute name="Implementation-URL" value="http://pdfbox.apache.org/"/>
            </manifest>
        </jar>
    </target>

    <target name="jempbox.package" depends="get.externallibs.jempbox,jempbox.compile" description="Package jempbox into a jar file">
        <jar jarfile="${jempbox.jar}">
            <fileset dir="${jempbox.dest.dir}"/>
            <metainf dir="." includes="*.txt"/>
            <manifest>
                <attribute name="Built-By" value="${user.name}"/>
                <attribute name="Implementation-Title" value="Apache JempBox"/>
                <attribute name="Implementation-Version" value="${project.version}"/>
                <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
                <attribute name="Implementation-URL" value="http://pdfbox.apache.org/"/>
            </manifest>
        </jar>
    </target>

    <!-- We use Maven to create the release packages. Keep this target for -->
    <!-- now for backwards compatibility with old build scripts and habits -->
    <target name="dist" depends="pdfbox.clean,pdfbox.package,javadoc,build.NET,checkstyle"/>

    <target name="clean" depends="fontbox.clean,jempbox.clean,pdfbox.clean"/>

    <target name="checkForIKVM">
        <condition property="IKVMAvailable">
            <and>
                <os family="windows"/>
                <available file="${ikvmc}" property="ignored" />
            </and>
        </condition>
    </target>

    <target name="build.NET" depends="checkForIKVM,pdfbox.package" if="IKVMAvailable" description="Build PDFBox .NET DLL files">
        <echo>Building JUnit</echo>
		<exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-out:${bin.dir}\junit.dll" />
            <arg value="${junit.jar}" />
        </exec>
        <echo>Building BC Prov</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-out:${bin.dir}\${bcprov.name}.dll" />
            <arg value="${bcprov.jar}" />
        </exec>
        <echo>Building BC Mail</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:bin/${bcprov.name}.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-out:${bin.dir}\${bcmail.name}.dll" />
            <arg value="${bcmail.jar}" />
        </exec>
        <echo>Building ICU4J</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-out:${bin.dir}\${icu4j.name}.dll" />
            <arg value="${icu4j.jar}" />
        </exec>
        <echo>Building FontBox</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\${fontbox.release.name}.dll" />
            <arg value="${fontbox.jar}" />
        </exec>
        <echo>Building JempBox</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\${jempbox.release.name}.dll" />
            <arg value="${jempbox.jar}" />
        </exec>
        <echo>Building Commons Logging</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-out:${bin.dir}\commons-logging.dll" />
            <arg value="${logging.jar}" />
        </exec>
        <echo>Building PDFBox</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin/${jempbox.release.name}.dll" />
            <arg value="-reference:bin/${bcprov.name}.dll" />
            <arg value="-reference:bin/${bcmail.name}.dll" />
            <arg value="-reference:bin/${icu4j.name}.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/commons-logging.dll" />
            <arg value="-target:library" />
            <arg value="-compressresources" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\${pdfbox.release.name}.dll" />
            <arg value="${pdfbox.target.dir}\${pdfbox.release.name}.jar" />
        </exec>
        <echo>Building Decrypt</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\Decrypt.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\Decrypt.class" />
        </exec>
        <echo>Building Encrypt</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\Encrypt.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\Encrypt.class" />
        </exec>
        <echo>Building ExportFDF</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\ExportFDF.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\ExportFDF.class" />
        </exec>
        <echo>Building ExportXFDF</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\ExportXFDF.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\ExportXFDF.class" />
        </exec>
        <echo>Building ExtractImages</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\ExtractImages.exe" />
            <arg value="${target.dir}\classes\org\apache\pdfbox\ExtractImages.class" />
        </exec>
        <echo>Building ExtractText</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\ExtractText.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\ExtractText.class" />
        </exec>
        <echo>Building ImportFDF</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\ImportFDF.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\ImportFDF.class" />
        </exec>
        <echo>Building ImportXFDF</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\ImportXFDF.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\ImportXFDF.class" />
        </exec>
        <echo>Building OverlayPDF</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\OverlayPDF.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\OverlayPDF.class" />
        </exec>
        <echo>Building PDFSplit</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\PDFSplit.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\PDFSplit.class" />
        </exec>
        <echo>Building PDFMerger</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\PDFMerger.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\PDFMerger.class" />
        </exec>
        <echo>Building PDFReader</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\PDFReader.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\PDFReader.class" />
        </exec>
        <echo>Building PDFDebugger</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\PDFDebugger.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\PDFDebugger.class" />
        </exec>
        <echo>Building WriteDecodedDoc</echo>
        <exec executable="${ikvmc}">
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Util.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Charsets.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Text.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Core.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Media.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Misc.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.Security.dll" />
            <arg value="-reference:${ikvm.dir}/bin/IKVM.OpenJDK.SwingAWT.dll" />
            <arg value="-reference:bin/junit.dll" />
            <arg value="-reference:bin/${fontbox.release.name}.dll" />
            <arg value="-reference:bin\${pdfbox.release.name}.dll" />
            <arg value="-version:${project.version}.0" />
            <arg value="-out:${bin.dir}\WriteDecodedDoc.exe" />
            <arg value="${pdfbox.target.dir}\classes\org\apache\pdfbox\WriteDecodedDoc.class" />
        </exec>
    </target>

    <target name="javadoc" depends="pdfbox.compile" description="Create Javadocs">
        <javadoc packagenames="org.*"
               sourcepath="${pdfbox.src.dir}"
               destdir="${pdfbox.target.dir}/javadoc"
               author="true"
               version="true"
               use="true"
               windowtitle="${pdfbox.release.name} API"
               doctitle="${project.name}"
               verbose="no"
               classpathref="pdfbox.build.classpath"
               encoding="ISO-8859-1"
               breakiterator="yes">
            <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
        </javadoc>
        <!-- PDFBOX-461: Disable javadoc creation timestamp -->
        <replaceregexp match="&lt;!-- Generated by javadoc .* --&gt;"
                       replace="&lt;!-- Generated by javadoc --&gt;"
                       flags="g" byline="true">
            <fileset dir="${pdfbox.target.dir}/javadoc" includes="**/*.html" />
        </replaceregexp>
    </target>

</project>
