source: gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/build.xml@ 35487

Last change on this file since 35487 was 35487, checked in by cstephen, 3 years ago

Fix build.xml log statement

File size: 3.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project name="gs3-koreromaori-ext" default="usage" basedir=".">
4 <loadproperties prefix="gs3." srcFile="${basedir}/../../../build.properties" />
5 <property name="src.home" value="${basedir}/src/main/java" />
6 <property name="build.home" value="${basedir}/build" />
7 <property name="web.dir" value="${basedir}/src/main/webapp" />
8
9 <condition property="tomcat.dir" value="${gs3.tomcat.installed.path}" else="${basedir}/../../../packages/tomcat">
10 <and>
11 <isset property="gs3.tomcat.installed.path" />
12 <not>
13 <equals arg1="${gs3.tomcat.installed.path}" arg2="" />
14 </not>
15 </and>
16 </condition>
17
18 <property name="tomcat.webapps.dir" value="${tomcat.dir}/webapps" />
19
20 <path id="compile.classpath">
21 <fileset dir="lib/java">
22 <include name="*.jar" />
23 </fileset>
24 </path>
25
26 <!-- Targets -->
27 <target name="file-checks" description="Ensures that required external files exist.">
28 <fail message="config.properties was not found. Please run ${basedir}/setup.sh">
29 <condition>
30 <not>
31 <available file="${basedir}/config.properties"></available>
32 </not>
33 </condition>
34 </fail>
35 </target>
36
37 <target name="usage" description="Print a help message">
38 <echo message=" Execute 'ant -projecthelp' for a list of targets." />
39 <echo message=" Execute 'ant -help' for Ant help." />
40 </target>
41
42 <target name="compile" description="Compile any java classes.">
43 <property name="build.classes" value="${build.home}/classes" />
44
45 <!-- Reset the build directory -->
46 <delete dir="${build.home}" />
47 <mkdir dir="${build.home}" />
48 <mkdir dir="${build.classes}" />
49
50 <!-- Compile all java files -->
51 <javac srcdir="${src.home}" destdir="${build.classes}" debug="true">
52 <classpath>
53 <path refid="compile.classpath" />
54 </classpath>
55 </javac>
56 </target>
57
58 <target name="package" depends="file-checks,compile" description="Packages the Korero Maori interface into a war file.">
59 <echo message="Creating ${build.home}/gs3-koreromaori.war" />
60
61 <!-- <copy file="${basedir}/log4j2.xml" todir="${build.classes}" /> -->
62
63 <war destfile="${build.home}/gs3-koreromaori.war" webxml="${web.dir}/WEB-INF/web.xml">
64 <fileset dir="${web.dir}/webContent" includes="**" />
65 <fileset file="${basedir}/config.properties" />
66
67 <lib dir="lib/java">
68 <exclude name="tomcat-servlet-api-8.5.51.jar" /> <!-- The tomcat server should already have its own server-api jar -->
69 </lib>
70
71 <classes dir="${build.classes}" />
72
73 <webinf dir="${web.dir}/WEB-INF" />
74 </war>
75 </target>
76
77 <target name="install" depends="package" description="Installs the Korero Maori Interface package.">
78 <echo message="Copying war package to ${tomcat.webapps.dir}" />
79 <copy file="${build.home}/gs3-koreromaori.war" todir="${tomcat.webapps.dir}" />
80 <echo message="Done! Tomcat may take a few seconds to recognise the changes." />
81 </target>
82</project>
Note: See TracBrowser for help on using the repository browser.