All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ant.compile.xml Maven / Gradle / Ivy

There is a newer version: 4.2.2
Show newest version
<?xml version="1.0"?>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- iText, a JAVA - PDF library                                      -->
<!-- $Id: compile.xml 3954 2009-06-08 00:50:15Z xlv $         -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<project name="iText.compile" default="help">
	<property file="local.properties" />
	<property file="${user.home}/.ant.properties" />
	<property file=".ant.properties" />
	
	<path id="itext.classpath">
	    <pathelement location="${itext.bin}"/>
		<!-- jars needed for iText (core) -->
		    <pathelement path="${itext.lib}/${lib.bcmail}"/>
	    <pathelement path="${itext.lib}/${lib.bcprov}"/>
	    <pathelement path="${itext.lib}/${lib.bctsp}"/>
		<!-- jars needed for RUPS -->
	    <pathelement path="${itext.lib}/${lib.pdf-renderer}"/>
	    <pathelement path="${itext.lib}/${lib.dom4j}"/>
	</path>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Help                                                             -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="help" description="--> shows the help screen">
        <echo>COMPILING AND JARRING THE CODE (compile.xml)</echo>
        <echo>ant compile: compiles iText (core)</echo>
        <echo>ant compile.rtf: compiles iText RTF</echo>
        <echo>ant compile.rups: compiles iText RUPS</echo>
        <echo>ant jar: compiles and jars iText</echo>
        <echo>ant jar.rtf: compiles and jars iText RTF</echo>
        <echo>ant jar.rups: compiles and jars iText RUPS</echo>
        <echo />
	</target>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Compiling the code                                               -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="compile" description="--> compiles the iText code">
        <mkdir dir="${itext.bin}" />
        <javac source="${itext.jdk.core}" target="${itext.jdk.core}" srcdir="${itext.src}/core" destdir="${itext.bin}">
    	<classpath refid="itext.classpath"/>
    	</javac>
    </target>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Compiling the rtf code                                           -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="compile.rtf" depends="compile" description="--> compiles the iText code">
        <mkdir dir="${itext.rtf.bin}" />
        <javac source="${itext.jdk.core}" target="${itext.jdk.core}" srcdir="${itext.rtf.src}" destdir="${itext.rtf.bin}">
            <classpath refid="itext.classpath"/>
        </javac>
    </target>
	
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Compiling the RUPS code                                          -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="compile.rups" depends="compile" description="--> compiles the RUPS code">
        <mkdir dir="${itext.rups.bin}" />
        <javac source="${itext.jdk.rups}" target="${itext.jdk.rups}" srcdir="${itext.rups.src}" destdir="${itext.rups.bin}">
    		<classpath refid="itext.classpath"/>
    	</javac>
    </target>
	
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Compiling the Toolbox code                                          -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="compile.toolbox" depends="compile" description="--> compiles the Toolbox code">
        <mkdir dir="${itext.toolbox.bin}" />
        <javac source="${itext.jdk.toolbox}" target="${itext.jdk.toolbox}" srcdir="${itext.toolbox.src}" destdir="${itext.toolbox.bin}">
    		<classpath refid="itext.classpath"/>
    	</javac>
    </target>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Jarring the code                                                 -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="make.jar" depends="compile" description="--> makes a jarfile from the iText code">
        <mkdir dir="${itext.bin}/com/lowagie/text/pdf/fonts" />
        <copy todir="${itext.bin}/com/lowagie/text/pdf/fonts" overwrite="yes">
            <fileset dir="${itext.src}/core/com/lowagie/text/pdf/fonts">
                <include name="**/*.afm"/>
                <include name="**/*.html"/>
            </fileset>
        </copy>
        <copy todir="${itext.bin}/com/lowagie/text/" overwrite="yes">
            <fileset dir="${itext.src}/core/com/lowagie/text/">
                <include name="**/*.txt"/>
            </fileset>
        </copy>
        <jar jarfile="${itext.jar}" basedir="${itext.bin}">
            <manifest>
                <attribute name="Main-Class" value="com.lowagie.tools.ToolboxAvailable"/>
                <!-- <attribute name="Class-Path" value="iText-toolbox.jar iText-toolbox-${releasenumber}.jar ${lib.bcmail} ${lib.bcprov} ${lib.bctsp}"/> -->
            </manifest>
        </jar>
    </target>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Compiling and Jarring the code                                   -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	
    <target name="jar"  depends="compile, make.jar" description="--> makes a jarfile from the iText code" />
    
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Jarring the rtf code                                             -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="jar.rtf"  depends="compile.rtf" description="--> makes a jarfile from the iText rtf code">
        <jar jarfile="${itext.rtf.jar}" basedir="${itext.rtf.bin}"/>
    </target>
    
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Making the jars for RUPS                                         -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

	<target name="jar.rups" depends="compile.rups">
        <copy todir="${itext.rups.bin}" overwrite="yes">
            <fileset dir="${itext.rups.src}">
                <include name="**/*.png"/>
            </fileset>
        </copy>
		<jar destfile="${itext.rups.jar}" basedir="${itext.rups.bin}" includes="**/*.class, **/*.png">
		    <manifest>
                <attribute name="Main-Class" value="com.lowagie.rups.Rups"/>
                <attribute name="Class-Path" value="iText-${releasenumber}.jar ${lib.pdf-renderer} ${lib.bcmail} ${lib.bcprov} ${lib.bctsp} ${lib.dom4j}"/>
            </manifest>
		</jar>
	</target>
    
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Making the jars for the Toolbox                                  -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

	<target name="jar.toolbox" depends="compile.toolbox">
        <copy todir="${itext.toolbox.bin}" overwrite="yes">
            <fileset dir="${itext.toolbox.src}">
                <include name="**/*.gif"/>
                <include name="**/*.png"/>
                <include name="**/*.txt"/>
            </fileset>
        </copy>
		<jar destfile="${itext.toolbox.jar}" basedir="${itext.toolbox.bin}" includes="**/*.class, **/*.png, **/*.txt, **/*.gif">
		    <manifest>
                <attribute name="Main-Class" value="com.lowagie.toolbox.Toolbox"/>
                <attribute name="Class-Path" value="iText-${releasenumber}.jar ${lib.bcmail} ${lib.bctsp} ${lib.bcprov}"/>
            </manifest>
		</jar>
	</target>

	<!-- This is probably no longer used by anyone: -->
	
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Compiling the code for debugging                                 -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <target name="compile.debug" description="--> compiles the iText code for debugging">
        <mkdir dir="${itext.bin}" />
        <javac source="${itext.jdk.core}" target="${itext.jdk.core}" srcdir="${itext.src}/core" destdir="${itext.bin}" listfiles="yes" debug="true" debuglevel="lines,vars,source">
        	<classpath refid="itext.classpath"/>
       	</javac>
    </target>
	
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Jarring the code (debug)                                         -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	
    <target name="jar.debug"  depends="compile.debug, make.jar" description="--> makes a jarfile from the iText code" />

</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy