source: TI01-discovery/trunk/ws-Discovery/build.xml @ 1418

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/ws-Discovery/build.xml@5256
Revision 1418, 2.5 KB checked in by mpritcha, 13 years ago (diff)

Corrected basedir attribute of jar action within target="dist" to ensure that result jar file has correct directory structure (previously included "classes" directory, which broke it).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="ws-Discovery" default="all" basedir=".">
3   
4    <property name="src.dir"     value="src"/>
5    <property name="build.dir"   value="build"/>
6    <property name="dist.home" value="${basedir}/dist"/>
7    <property name="docs.home" value="${basedir}/dist/docs"/>
8    <property name="classes.dir" value="${build.dir}/classes"/>
9    <property name="jar.dir"     value="${build.dir}/jar"/>
10     <property name="lib.dir"    value="lib"/>
11
12    <path id="classpath">
13        <fileset dir="${lib.dir}" includes="**/*.jar"/>
14    </path>
15
16
17
18    <target name="clean">
19        <delete dir="${build.dir}"/>
20        <delete dir="${dist.home}"/>
21    </target>
22
23    <target name="compile">
24        <mkdir dir="${classes.dir}"/>
25        <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" />
26    </target>
27
28    <target name="jar" depends="compile">
29        <mkdir dir="${jar.dir}"/>
30        <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}"/>
31 
32    </target>
33   
34    <target name="dist" depends="compile,javadoc" description="Create binary distribution">
35                <!-- Copy documentation subdirectories -->
36                <mkdir dir="${dist.home}/docs"/>
37                <copy todir="${dist.home}/docs">
38                        <fileset dir="${docs.home}"/>
39                </copy>
40                <!-- Create application JAR file -->
41                <jar jarfile="${dist.home}/${ant.project.name}.jar" basedir="${classes.dir}"/>
42                <!-- Copy additional files to ${dist.home} as necessary -->
43    </target>
44
45   <target name="javadoc" depends="compile" description="Create Javadoc API documentation">
46                <mkdir dir="${dist.home}/docs/api"/>
47                <javadoc sourcepath="${src.dir}" destdir="${dist.home}/docs/api" packagenames="*">
48                        <classpath refid="classpath"/>
49                </javadoc>
50   </target>
51 <!-- 
52    <target depends="compile" name="deploy">
53        <java classname="org.apache.axis.client.AdminClient" fork="false">
54            <arg value="-lhttp://localhost:8080/exist/services/Discovery"/>
55            <arg value="${src.dir}/uk/ac/cclrc/ndg/discovery/deploy.wsdd"/>
56            <classpath refid="classpath"/>
57        </java>
58    </target>
59
60    <target depends="compile" name="undeploy">
61        <java classname="org.apache.axis.client.AdminClient" fork="false">
62            <arg value="-lhttp://localhost:8080/exist/services/Discovery"/>
63            <arg value="${src.dir}/uk/ac/cclrc/ndg/discovery/undeploy.wsdd"/>
64            <classpath refid="classpath"/>
65        </java>
66    </target> -->
67
68     <target name="all" depends="clean,compile"/>
69
70</project>
Note: See TracBrowser for help on using the repository browser.