-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
83 lines (69 loc) · 3.09 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="Idemix terminal service" default="all">
<property file="build.properties" />
<property file="deploy.properties" />
<!-- Provides deploy.user and deploy.pass -->
<property file="deploy.credentials" />
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${deploy.libs}">
<include name="*.jar"/>
</fileset>
</path>
<!-- Configure the custom Ant tasks for the Tomcat application manager -->
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="classpath" />
<taskdef name="list" classname="org.apache.catalina.ant.ListTask" classpathref="classpath" />
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask" classpathref="classpath" />
<taskdef name="findleaks" classname="org.apache.catalina.ant.FindLeaksTask" classpathref="classpath" />
<taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask" classpathref="classpath" />
<taskdef name="start" classname="org.apache.catalina.ant.StartTask" classpathref="classpath" />
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask" classpathref="classpath" />
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="classpath" />
<target name="clean">
<delete dir="${bin.dir}" />
</target>
<target name="distclean" depends="clean">
<delete file="${deploy.file}" />
</target>
<target name="compile">
<mkdir dir="${bin.dir}" />
<javac srcdir="${src.dir}" destdir="${bin.dir}" includeantruntime="false" target="1.6" source="1.6">
<classpath refid="classpath" />
</javac>
</target>
<target name="service" depends="compile">
<copy todir="${bin.dir}/resources/">
<fileset dir="${data.dir}"/>
</copy>
<war destfile="${deploy.file}" webxml="${web.dir}/WEB-INF/web.xml" update="true">
<lib dir="${lib.dir}" />
<classes dir="${bin.dir}" />
<fileset dir="${web.dir}">
<exclude name="WEB-INF/" />
<exclude name="META-INF/" />
</fileset>
<metainf file="${web.dir}/META-INF/context.xml" />
</war>
</target>
<target name="all" depends="service" />
<target name="eclipse">
<copy file="${eclipse.dir}/.project" todir="${base.dir}" />
<copy file="${eclipse.dir}/.classpath" todir="${base.dir}" />
</target>
<!-- Tomcat web application management -->
<target name="deploy" description="Install web service" depends="service">
<deploy username="${deploy.user}" password="${deploy.pass}"
url="${deploy.host}" path="${deploy.path}"
war="file:${deploy.file}"/>
</target>
<target name="reload" description="Reload web service" depends="service">
<reload username="${deploy.user}" password="${deploy.pass}"
url="${deploy.host}" path="${deploy.path}" />
</target>
<target name="undeploy" description="Remove web service">
<undeploy username="${deploy.user}" password="${deploy.pass}"
url="${deploy.host}" path="${deploy.path}"/>
</target>
</project>