source: axis/build.xml @ 55de6a9

axis_examplecompt_changesinfo-ops
Last change on this file since 55de6a9 was 55de6a9, checked in by Ted Faber <faber@…>, 9 years ago

Example of using java to talk to fedd

  • Property mode set to 100644
File size: 5.0 KB
Line 
1<!--
2  Project file for ant to build the crudge viewer.  Requires Jung and
3  bouncycastle.
4
5  Targets:
6    all: clean then compile and make docs
7    compile: build the library and test programs
8    run: run crudge
9    jar: build jar file
10    signjar: sign jar files for export
11    install: copy filed to web host
12    doc: greate API javadocs in ./doc
13    dev-doc: create developer API javadocs in ./dev-doc (includes
14            package/private/protected functions)
15    clean: remove created files (includes .der and .pem in this directory)
16-->
17
18<project name="Fedd Axis" default="all">
19  <property name="src.dir" value="${basedir}"/>
20  <property name="lib.dir" value="${basedir}${file.separator}jar"/>
21  <property name="syslib.dir" value="/usr/local/share/java/classes"/>
22  <property name="doc.dir" value="${basedir}${file.separator}doc"/>
23  <property name="devdoc.dir" value="${basedir}${file.separator}dev-doc"/>
24  <property name="build.dir" value="${basedir}${file.separator}build"/>
25  <property name="classes.dir" value="${build.dir}/classes"/>
26  <property name="jar.dir" value="${build.dir}${file.separator}jar"/>
27  <property name="axis.task.home"
28    value="/usr/local/tomcat5.5/webapps/axis/WEB-INF/lib"/>
29  <property name="keystore.file" value="${basedir}${file.separator}keystore"/>
30  <property name="wsdl.dir" value="/zod/fedd-repo/wsdl/"/>
31
32  <path id="compile.classpath">
33    <fileset dir="${lib.dir}" includes="**/*.jar"/>
34  </path>
35
36  <taskdef resource="axis-tasks.properties" classpathref="compile.classpath" />
37
38  <target name="all" depends="clean" description="Clean then build" />
39
40  <target name="clean">
41    <delete dir="${basedir}${file.separator}edu"/>
42    <delete dir="${build.dir}"/>
43    <delete dir="${doc.dir}"/>
44    <delete dir="${devdoc.dir}"/>
45    <delete file="${keystore.file}"/>
46  </target>
47
48  <target name="compile" depends="wsdl-parse" description="Compile the source">
49    <mkdir dir="${classes.dir}" />
50    <javac srcdir="${src.dir}" destdir="${classes.dir}" 
51      classpathref="compile.classpath" includeAntRuntime="no"/>
52  </target>
53
54  <target name="keystore.check">
55    <available property="keystore.present" 
56      file="${basedir}${file.separator}keystore"/>
57  </target>
58
59
60  <target name="keys" depends="keystore.check" unless="keystore.present" >
61    <exec executable="/usr/bin/perl">
62      <arg value="./splitkey.pl"/>
63      <arg file="./emulab.pem"/>
64    </exec>
65    <exec executable="openssl">
66      <arg value="pkcs8"/>
67      <arg value="-topk8"/>
68      <arg value="-nocrypt"/>
69      <arg value="-in"/>
70      <arg file="./key.pem"/>
71      <arg value="-inform"/>
72      <arg value="PEM"/>
73      <arg value="-out"/>
74      <arg file="./key.der"/>
75      <arg value="-outform"/>
76      <arg value="DER"/>
77    </exec>
78    <exec executable="openssl">
79      <arg value="x509"/>
80      <arg value="-in"/>
81      <arg file="./cert.pem"/>
82      <arg value="-inform"/>
83      <arg value="PEM"/>
84      <arg value="-out"/>
85      <arg file="./cert.der"/>
86      <arg value="-outform"/>
87      <arg value="DER"/>
88    </exec>
89    <java classname="ImportKey" fork="true">
90      <arg file="./key.der"/>
91      <arg file="./cert.der"/>
92      <arg value="fedd"/>
93    </java>
94    <delete>
95      <fileset dir="${basedir}" includes="**/cert.*"/>
96      <fileset dir="${basedir}" includes="**/key.*"/>
97    </delete>
98    <move file="${user.home}${file.separator}keystore.ImportKey"
99      tofile="${keystore.file}"/>
100  </target>
101
102  <target name="multistatus" depends="compile,keys"
103    description="run visualizer">
104    <java classname="MultiStatus" fork="true" >
105      <classpath>
106        <path refid="compile.classpath"/>
107        <pathelement path="${classes.dir}"/>
108      </classpath>
109    </java>
110    <echo message="${user.name}"/>
111  </target>
112
113  <target name="create" depends="compile,keys"
114    description="run visualizer">
115    <java classname="Create" fork="true" >
116      <classpath>
117        <path refid="compile.classpath"/>
118        <pathelement path="${classes.dir}"/>
119      </classpath>
120      <arg value="${user.name}-test"/>
121    </java>
122  </target>
123
124  <target name="doc" description="Generate API documentation">
125    <mkdir dir="${doc.dir}"/>
126    <javadoc sourcepath="${src.dir}" destdir="${doc.dir}"
127      classpathref="compile.classpath" access="public"
128      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
129  </target>
130
131  <target name="dev-doc" description="Generate API documentation">
132    <mkdir dir="${devdoc.dir}"/>
133    <javadoc sourcepath="${src.dir}" destdir="${devdoc.dir}"
134      classpathref="compile.classpath" access="private"
135      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
136  </target>
137
138  <target name="wsdl.check">
139    <available file="${basedir}${file.separator}edu" type="dir" 
140      property="wsdl.available"/>
141  </target>
142
143  <target name="wsdl-parse" depends="wsdl.check" unless="wsdl.available" >
144    <axis-wsdl2java url="${wsdl.dir}${file.separator}fedd.wsdl" output="${basedir}" />
145    <axis-wsdl2java url="${wsdl.dir}${file.separator}fedd_internal.wsdl"
146      output="${basedir}" />
147  </target>
148</project>
Note: See TracBrowser for help on using the repository browser.