ant.rups.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of itext Show documentation
Show all versions of itext Show documentation
iText, a free Java-PDF library
<?xml version="1.0"?> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- iText, a JAVA - PDF library --> <!-- $Id: compile.xml 3078 2007-12-08 20:14:45Z xlv $ --> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <project name="rups" default="jar"> <property file="local.properties" /> <property file="${user.home}/.ant.properties" /> <property file=".ant.properties" /> <path id="itext.classpath"> <pathelement location="${itext.bin}"/> <pathelement path="${itext.lib}/pdf-renderer.jar"/> <pathelement path="${itext.lib}/dom4j-1.6.1.jar"/> </path> <target name="release" depends="signed.jars"> <copy file="${itext.src}/jnlp/rups.jnlp" tofile="${itext.rups.jnlp}/rups.jnlp" overwrite="yes"/> </target> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- Compiling the code --> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <target name="compile" description="--> compiles the PdfRenderer 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> <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> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- All the jars --> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <target name="jar" depends="compile"> <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> <mkdir dir="${itext.rups.jnlp}" /> <jar jarfile="${itext.rups.jnlp}/iText.jar" basedir="${itext.bin}" excludes="com/lowagie/rups/**,com/lowagie/tools/**,com/lowagie/examples/**,**/*.cmap,**/*.properties,com/lowagie/text/pdf/fonts/cmaps/**"> <manifest> <attribute name="Class-Path" value="bcmail-${bc.jdk}-${bc.version}.jar bcprov-${bc.jdk}-${bc.version}.jar"/> </manifest> </jar> <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.jar pdf-renderer.jar bcmail-${bc.jdk}-${bc.version}.jar bcprov-${bc.jdk}-${bc.version}.jar dom4j-1.6.1.jar"/> </manifest> </jar> </target> <target name="unsign.bcmail"> <mkdir dir="${itext.rups.jnlp}" /> <mkdir dir="${itext.bin.temp}" /> <unjar src="${itext.lib}/bcmail-${bc.jdk}-${bc.version}.jar" dest="${itext.bin.temp}" /> <jar destfile="${itext.rups.jnlp}/bcmail-${bc.jdk}-${bc.version}.jar" basedir="${itext.bin.temp}" includes="**/*.class" /> <delete dir="${itext.bin.temp}" /> </target> <target name="unsign.bcprov"> <mkdir dir="${itext.rups.jnlp}" /> <mkdir dir="${itext.bin.temp}" /> <unjar src="${itext.lib}/bcprov-${bc.jdk}-${bc.version}.jar" dest="${itext.bin.temp}" /> <jar destfile="${itext.rups.jnlp}/bcprov-${bc.jdk}-${bc.version}.jar" basedir="${itext.bin.temp}" includes="**/*.class" /> <delete dir="${itext.bin.temp}" /> </target> <target name="jars" depends="jar, unsign.bcmail, unsign.bcprov"> <copy file="${itext.lib}/dom4j-1.6.1.jar" tofile="${itext.rups.jnlp}/dom4j-1.6.1.jar" overwrite="yes"/> <copy file="${itext.lib}/pdf-renderer.jar" tofile="${itext.rups.jnlp}/pdf-renderer.jar" overwrite="yes"/> </target> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- Signing the jars --> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <target name="check-keystore" > <condition property="keystore-exists"> <available file="${itext.keystore.filename}" type="file"/> </condition> </target> <target name="keystore" depends="check-keystore" unless="keystore-exists"> <genkey keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" dname="${itext.keystore.dname}" /> </target> <target name="signed.jars" depends="keystore, jars"> <signjar jar="${itext.rups.jnlp}/bcmail-${bc.jdk}-${bc.version}.jar" keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" /> <signjar jar="${itext.rups.jnlp}/bcprov-${bc.jdk}-${bc.version}.jar" keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" /> <signjar jar="${itext.rups.jnlp}/dom4j-1.6.1.jar" keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" /> <signjar jar="${itext.rups.jnlp}/iText.jar" keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" /> <signjar jar="${itext.rups.jnlp}/iText-rups.jar" keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" /> <signjar jar="${itext.rups.jnlp}/pdf-renderer.jar" keystore="${itext.keystore.filename}" storepass="${itext.keystore.password}" alias="${itext.keystore.alias}" storetype="${itext.keystore.storetype}" /> </target> </project>