| 1 |
<project default="jar" basedir="." name="jeuclid-fop"> |
| 2 |
<property name="build.directory" value="target"/> |
| 3 |
<property name="build.output" value="${build.directory}/classes"/> |
| 4 |
<property environment="env"/> |
| 5 |
|
| 6 |
|
| 7 |
<path id="libs-build-classpath"> |
| 8 |
<fileset dir="${basedir}/lib"> |
| 9 |
<include name="*.jar"/> |
| 10 |
</fileset> |
| 11 |
</path> |
| 12 |
|
| 13 |
|
| 14 |
<target name="init" description="Init dependencies"> |
| 15 |
<echo message="------------------- ${ant.project.name} ----------------"/> |
| 16 |
<echo message="${ant.version}"/> |
| 17 |
<echo message="VM: ${java.vm.version}, ${java.vm.vendor}"/> |
| 18 |
<echo message="JAVA_HOME: ${env.JAVA_HOME}"/> |
| 19 |
|
| 20 |
<available property="logging.present" classname="org.apache.commons.logging.LogFactory" classpathref="libs-build-classpath"/> |
| 21 |
<condition property="logging.message" value="commons-logging Support PRESENT"> |
| 22 |
<equals arg1="${logging.present}" arg2="true"/> |
| 23 |
</condition> |
| 24 |
<condition property="logging.message" value="commons-logging Support NOT Present"> |
| 25 |
<not> |
| 26 |
<equals arg1="${logging.present}" arg2="true"/> |
| 27 |
</not> |
| 28 |
</condition> |
| 29 |
<echo message="${logging.message}"/> |
| 30 |
|
| 31 |
<available property="fop.present" classname="org.apache.fop.cli.Main" classpathref="libs-build-classpath"/> |
| 32 |
<condition property="fop.message" value="FOP Support PRESENT"> |
| 33 |
<equals arg1="${fop.present}" arg2="true"/> |
| 34 |
</condition> |
| 35 |
<condition property="fop.message" value="FOP Support NOT Present"> |
| 36 |
<not> |
| 37 |
<equals arg1="${fop.present}" arg2="true"/> |
| 38 |
</not> |
| 39 |
</condition> |
| 40 |
<echo message="${fop.message}"/> |
| 41 |
|
| 42 |
<available property="batik.present" classname="org.apache.batik.dom.AbstractNode" classpathref="libs-build-classpath"/> |
| 43 |
<condition property="batik.message" value="Batik Support PRESENT"> |
| 44 |
<equals arg1="${batik.present}" arg2="true"/> |
| 45 |
</condition> |
| 46 |
<condition property="batik.message" value="Batik Support NOT Present"> |
| 47 |
<not> |
| 48 |
<equals arg1="${batik.present}" arg2="true"/> |
| 49 |
</not> |
| 50 |
</condition> |
| 51 |
<echo message="${batik.message}"/> |
| 52 |
|
| 53 |
<available property="jeuclidcore.present" classname="net.sourceforge.jeuclid.LayoutContext" classpathref="libs-build-classpath"/> |
| 54 |
<condition property="jeuclidcore.message" value="jeuclid-core Support PRESENT"> |
| 55 |
<equals arg1="${jeuclidcore.present}" arg2="true"/> |
| 56 |
</condition> |
| 57 |
<condition property="jeuclidcore.message" value="jeuclid-core Support NOT Present"> |
| 58 |
<not> |
| 59 |
<equals arg1="${jeuclidcore.present}" arg2="true"/> |
| 60 |
</not> |
| 61 |
</condition> |
| 62 |
<echo message="${jeuclidcore.message}"/> |
| 63 |
|
| 64 |
<available property="xmlext.present" classname="org.xml.sax.InputSource" classpathref="libs-build-classpath"/> |
| 65 |
<condition property="xmlext.message" value="xml-commons-external Support PRESENT"> |
| 66 |
<equals arg1="${xmlext.present}" arg2="true"/> |
| 67 |
</condition> |
| 68 |
<condition property="xmlext.message" value="xml-commons-external Support NOT Present"> |
| 69 |
<not> |
| 70 |
<equals arg1="${xmlext.present}" arg2="true"/> |
| 71 |
</not> |
| 72 |
</condition> |
| 73 |
<echo message="${xmlext.message}"/> |
| 74 |
|
| 75 |
<available property="xmlgraphics.present" classname="org.apache.xmlgraphics.util.ClasspathResource" classpathref="libs-build-classpath"/> |
| 76 |
<condition property="xmlgraphics.message" value="xmlgraphics-commons Support PRESENT"> |
| 77 |
<equals arg1="${xmlgraphics.present}" arg2="true"/> |
| 78 |
</condition> |
| 79 |
<condition property="xmlgraphics.message" value="xmlgraphics-commons Support NOT Present"> |
| 80 |
<not> |
| 81 |
<equals arg1="${xmlgraphics.present}" arg2="true"/> |
| 82 |
</not> |
| 83 |
</condition> |
| 84 |
<echo message="${xmlgraphics.message}"/> |
| 85 |
</target> |
| 86 |
|
| 87 |
|
| 88 |
<target name="compile" depends="init" description="Compile the code"> |
| 89 |
<mkdir dir="${build.output}"/> |
| 90 |
<javac destdir="${build.output}" debug="true" deprecation="true" optimize="false"> |
| 91 |
<src> |
| 92 |
<pathelement location="src/main/java"/> |
| 93 |
</src> |
| 94 |
<classpath refid="libs-build-classpath"/> |
| 95 |
</javac> |
| 96 |
<copy todir="${build.output}"> |
| 97 |
<fileset dir="src/main/resources"/> |
| 98 |
</copy> |
| 99 |
<copy file="README" todir="${build.output}"/> |
| 100 |
</target> |
| 101 |
|
| 102 |
|
| 103 |
<target name="jar" depends="compile" description="Create the JAR"> |
| 104 |
<jar jarfile="${build.directory}/${ant.project.name}.jar" basedir="${build.output}"/> |
| 105 |
</target> |
| 106 |
</project> |