1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
<?xml version="1.0"?>
<!--
=======================================================================
Minimal Apache Ant build file for commons-openpgp
Copyright (c) 2005 The Apache Software Foundation. All rights
reserved.
=======================================================================
-->
<project name="commons-openpgp" default="jar" basedir=".">
<target name="properties">
<property name="build.target.dir" location="target"/>
<property name="build.classes.dir" location="${build.target.dir}/classes"/>
<property name="build.tests.dir"
location="${build.target.dir}/test-classes"/>
<property name="build.junit.fork" value="false"/>
<property name="build.junit.forkmode" value="once"/>
<property name="build.jar.basename" value="commons-openpgp"/>
<property name="build.jar.version" value="0.1"/>
<property name="build.jar.name"
value="${build.target.dir}/${build.jar.basename}-${build.jar.version}.jar"/>
</target>
<target name="setup" depends="properties">
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${build.tests.dir}"/>
<!-- feel free to get fancy using the Maven 2 Ant tasks, this is
just a placeholder for now -->
<path id="compilation-dependencies">
</path>
<path id="test-dependencies">
</path>
</target>
<target name="compile" depends="setup">
<javac srcdir="src/main/java" destdir="${build.classes.dir}"
source="1.3" target="1.3" debug="true">
<classpath refid="compilation-dependencies"/>
</javac>
</target>
<target name="compile-tests" depends="compile" unless="skip.tests!">
<javac srcdir="src/test/java" destdir="${build.tests.dir}"
source="1.3" target="1.3" debug="true">
<classpath id="test-classpath">
<path refid="compilation-dependencies"/>
<path refid="test-dependencies"/>
<pathelement location="${build.classes.dir}"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-tests" unless="skip.tests!">
<junit printsummary="false" haltonfailure="false"
fork="${build.junit.fork}" forkmode="${build.junit.forkmode}"
failureproperty="tests.failed">
<classpath>
<path refid="test-classpath"/>
<pathelement location="${build.tests.dir}"/>
<pathelement location="src/test/resources"/>
</classpath>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="src/test/java"/>
</batchtest>
</junit>
<fail if="tests.failed">At least one test has failed.</fail>
</target>
<target name="jar" depends="test">
<jar destfile="${build.jar.name}">
<fileset dir="${build.classes.dir}"/>
</jar>
</target>
<target name="clean" depends="properties">
<delete dir="${build.target.dir}"/>
</target>
</project>
|