source: java/build.xml @ 216c1d8

abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change on this file since 216c1d8 was edf9e1d, checked in by Ted Faber <faber@…>, 14 years ago

Neaten up and comment.

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[edf9e1d]1<!--
2  Project file for ant to build java ABAC library and test cases. 
3  Requires Jung and bouncycastle.
4
5  Targets:
6    all: clean then compile
7    compile: build the library and test programs
8    run-test: run a simple test program in GraphTest.java (params in target)
9    run-dump: run a program to dump a certificate in ASN1 (params in target)
10    jar: build jabac.jar in build/jar/jabac.jar
11    doc: greate API javadocs in ./doc
12    dev-doc: create developer API javadocs in ./dev-doc (includes
13            package/private/protected functions)
14    clean: remove created files (includes .der and .pem in this directory)
15-->
16
17<project name="jabac">
18
[2750153]19  <property name="src.dir" value="."/>
20  <property name="lib.dir" value="jar"/>
21  <property name="build.dir" value="build"/>
22  <property name="classes.dir" value="${build.dir}/classes"/>
23  <property name="jar.dir" value="${build.dir}/jar"/>
[e36ea1d]24  <property name="doc.dir" value="./doc"/>
[1b88de8]25  <property name="devdoc.dir" value="./dev-doc"/>
[7ad0076]26  <property name="main.class" value="GraphTest"/>
[ea3bddc]27  <property name="dump.class" value="Dumper"/>
[2750153]28
[edf9e1d]29  <path id="compile.classpath">
30    <fileset dir="${lib.dir}" includes="**/*.jar"/>
31  </path>
32
33  <target name="all" depends="clean, compile" description="Clean then build" />
34
[2750153]35  <target name="clean">
36    <delete dir="${build.dir}"/>
[e36ea1d]37    <delete dir="${doc.dir}"/>
[1b88de8]38    <delete dir="${devdoc.dir}"/>
[1a7e6d3]39    <delete>
40      <fileset dir="${basedir}" includes="**/*.der"/>
41      <fileset dir="${basedir}" includes="**/*.pem"/>
[edf9e1d]42      <fileset dir="${basedir}" includes="**/*.zip"/>
[1a7e6d3]43    </delete>
[2750153]44  </target>
45
46
47  <target name="compile" description="Compile the source">
48    <mkdir dir="${classes.dir}" />
49    <javac srcdir="${src.dir}" destdir="${classes.dir}" 
50      classpathref="compile.classpath"/>
51  </target>
52
[1a7e6d3]53  <target name="jar" depends="compile" description="Make a jar">
54    <mkdir dir="${jar.dir}"/>
[edf9e1d]55    <jar destfile="${jar.dir}/jabac.jar" basedir="${classes.dir}"
56      excludes="**/GraphTest.class **/Dumper.class">
[1a7e6d3]57      <manifest>
58        <attribute name="Class-Path" value="${classpath}" />
59      </manifest>
60    </jar>
61  </target>
62
[e36ea1d]63  <target name="doc" description="Generate API documentation">
64    <mkdir dir="${doc.dir}"/>
65    <javadoc sourcepath="${src.dir}" destdir="${doc.dir}"
66      classpathref="compile.classpath" access="public"
67      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
68  </target>
69
[1b88de8]70  <target name="dev-doc" description="Generate developer API documentation">
71    <mkdir dir="${doc.dir}"/>
72    <javadoc sourcepath="${src.dir}" destdir="${devdoc.dir}" access="private"
73      classpathref="compile.classpath" 
74      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
75  </target>
76
[edf9e1d]77  <target name="run-test" depends="compile" description="run visualizer">
[1a7e6d3]78    <java classname="${main.class}" fork="true" >
79      <classpath>
80        <path refid="compile.classpath"/>
81        <pathelement path="${classes.dir}"/>
82      </classpath>
[7ad0076]83      <arg file="../examples/experiment_create/"/>
[281158a]84      <arg value="Acme.experiment_create"/>
85      <arg value="Bob"/>
[1a7e6d3]86    </java>
87  </target>
[1b88de8]88
[edf9e1d]89  <target name="run-dump" depends="compile" description="run dumper">
[ea3bddc]90    <java classname="${dump.class}" fork="true" >
91      <classpath>
92        <path refid="compile.classpath"/>
93        <pathelement path="${classes.dir}"/>
94      </classpath>
95      <arg file="attr0.der"/>
96    </java>
97  </target>
[2750153]98</project>
Note: See TracBrowser for help on using the repository browser.