source: java/build.xml @ f31432f

abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0tvf-new-xml
Last change on this file since f31432f was 20d3d3c, checked in by Ted Faber <faber@…>, 14 years ago

Add default action and remove warnings

  • Property mode set to 100644
File size: 3.5 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:
[4ab0561]6    all: clean then compile and make docs
[edf9e1d]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
[20d3d3c]17<project name="jabac" default="all">
[edf9e1d]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"/>
[4ab0561]28  <property name="version" value="1.3"/>
[2750153]29
[edf9e1d]30  <path id="compile.classpath">
31    <fileset dir="${lib.dir}" includes="**/*.jar"/>
32  </path>
33
[4ab0561]34  <target name="all" depends="clean, compile, jar, doc, dev-doc"
35    description="Clean then build" />
[edf9e1d]36
[2750153]37  <target name="clean">
38    <delete dir="${build.dir}"/>
[e36ea1d]39    <delete dir="${doc.dir}"/>
[1b88de8]40    <delete dir="${devdoc.dir}"/>
[1a7e6d3]41    <delete>
42      <fileset dir="${basedir}" includes="**/*.der"/>
43      <fileset dir="${basedir}" includes="**/*.pem"/>
[edf9e1d]44      <fileset dir="${basedir}" includes="**/*.zip"/>
[1a7e6d3]45    </delete>
[2750153]46  </target>
47
48
49  <target name="compile" description="Compile the source">
50    <mkdir dir="${classes.dir}" />
51    <javac srcdir="${src.dir}" destdir="${classes.dir}" 
[20d3d3c]52      classpathref="compile.classpath" includeAntRuntime="no"/>
[2750153]53  </target>
54
[1a7e6d3]55  <target name="jar" depends="compile" description="Make a jar">
56    <mkdir dir="${jar.dir}"/>
[4ab0561]57    <jar destfile="${jar.dir}/jabac-${version}.jar" basedir="${classes.dir}"
[edf9e1d]58      excludes="**/GraphTest.class **/Dumper.class">
[1a7e6d3]59      <manifest>
60        <attribute name="Class-Path" value="${classpath}" />
61      </manifest>
62    </jar>
63  </target>
64
[e36ea1d]65  <target name="doc" description="Generate API documentation">
66    <mkdir dir="${doc.dir}"/>
67    <javadoc sourcepath="${src.dir}" destdir="${doc.dir}"
68      classpathref="compile.classpath" access="public"
69      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
70  </target>
71
[1b88de8]72  <target name="dev-doc" description="Generate developer API documentation">
73    <mkdir dir="${doc.dir}"/>
74    <javadoc sourcepath="${src.dir}" destdir="${devdoc.dir}" access="private"
75      classpathref="compile.classpath" 
76      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
77  </target>
78
[edf9e1d]79  <target name="run-test" depends="compile" description="run visualizer">
[1a7e6d3]80    <java classname="${main.class}" fork="true" >
81      <classpath>
82        <path refid="compile.classpath"/>
83        <pathelement path="${classes.dir}"/>
84      </classpath>
[7ad0076]85      <arg file="../examples/experiment_create/"/>
[281158a]86      <arg value="Acme.experiment_create"/>
87      <arg value="Bob"/>
[1a7e6d3]88    </java>
89  </target>
[1b88de8]90
[edf9e1d]91  <target name="run-dump" depends="compile" description="run dumper">
[ea3bddc]92    <java classname="${dump.class}" fork="true" >
93      <classpath>
94        <path refid="compile.classpath"/>
95        <pathelement path="${classes.dir}"/>
96      </classpath>
97      <arg file="attr0.der"/>
98    </java>
99  </target>
[2750153]100</project>
Note: See TracBrowser for help on using the repository browser.