source: other-projects/the-macronizer/trunk/build.xml

Last change on this file was 35791, checked in by cstephen, 2 years ago

Add updated macroniser code. This is a significant change to the codebase:

  • Servlets now send JSON responses that are easier to consume from other services.
  • Error responses are better conveyed and more infomative.
  • Monogram components have been touched up. They now bubble errors up and, where applicable, implement relevant interfaces.
  • The JSP interface has been removed
  • The SQL logging functionality has been deleted. It wasn't used before.
  • Dependencies updated.
  • Property svn:mime-type set to text/xml
File size: 3.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project name="gs3-macroniser-ext" default="usage" basedir=".">
4 <property name="package.name" value="gs3-macroniser" />
5 <property environment="env"/>
6 <property name="gsdl3.src.home" value="${env.GSDL3SRCHOME}"/>
7 <property name="src.home" value="${basedir}/src/main/java" />
8 <property name="build.home" value="${basedir}/build" />
9 <property name="web.dir" value="${basedir}/src/main/webapp" />
10 <property name="tomcat.webapps.dir" value="${gsdl3.src.home}/packages/tomcat/webapps" />
11
12 <path id="compile.classpath">
13 <fileset dir="lib/java">
14 <include name="*.jar" />
15 </fileset>
16 </path>
17
18 <!-- Targets -->
19 <target name="usage" description="Print a help message">
20 <echo message="Execute 'ant -projecthelp' for a list of targets." />
21 <echo message="Execute 'ant -help' for Ant help." />
22 </target>
23
24 <target name="gs3-setup" description="Ensures that the gs3-setup script has been sourced.">
25 <fail message="Please run 'gs3-setup' (Windows) or 'source gs3-setup.sh' (Linux/Mac) in the Greenstone3 installation that's associated with this installation before running this step.">
26 <condition>
27 <not>
28 <isset property="env.GSDL3HOME" />
29 </not>
30 </condition>
31 </fail>
32 </target>
33
34 <target name="compile" description="Compile any java classes.">
35 <property name="build.classes" value="${build.home}/classes" />
36
37 <!-- Reset the build directory -->
38 <delete dir="${build.home}" />
39 <mkdir dir="${build.home}" />
40 <mkdir dir="${build.classes}" />
41
42 <!-- Compile all java files -->
43 <javac srcdir="${src.home}" destdir="${build.classes}" debug="true">
44 <classpath>
45 <path refid="compile.classpath" />
46 </classpath>
47 </javac>
48 </target>
49
50 <target name="package" depends="compile" description="Create a WAR package.">
51 <echo message="Creating ${build.home}/${package.name}.war" />
52
53 <copy todir="${build.classes}/org/atea/nlptools/macroniser/monogram/data">
54 <fileset dir="${src.home}/org/atea/nlptools/macroniser/monogram/data" includes="**" />
55 </copy>
56
57 <war destfile="${build.home}/${package.name}.war" webxml="${web.dir}/WEB-INF/web.xml">
58 <fileset dir="${web.dir}/webContent" includes="**" />
59 <fileset file="${basedir}/config.properties" />
60
61 <lib dir="lib/java">
62 <exclude name="tomcat-servlet-api-8.5.51.jar" /> <!-- The host should already have its own servlet API jar -->
63 </lib>
64 <classes dir="${build.classes}" />
65
66 <webinf dir="${web.dir}/WEB-INF" />
67 </war>
68 </target>
69
70 <target name="install" depends="gs3-setup,package" description="Installs the WAR package into tomcat.">
71 <echo message="Copying war package to ${tomcat.webapps.dir}" />
72 <copy file="${build.home}/${package.name}.war" todir="${tomcat.webapps.dir}" />
73 <echo message="Done! Tomcat may take a few seconds to recognise the changes." />
74 </target>
75</project>
Note: See TracBrowser for help on using the repository browser.