-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
79 lines (69 loc) · 3.19 KB
/
build.xml
File metadata and controls
79 lines (69 loc) · 3.19 KB
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
<project name="ZimbraIMExtension" default="jar">
<import file="../../ant-global.xml" />
<!-- Properties -->
<property name="zimbraim.deploy.dir" location="${zimbra.home.dir}/lib/ext/zimbraim" />
<property name="jar.file" value="zimbraim.jar" />
<property name="webapp.dir" value="/opt/zimbra/jetty/webapps/zimbra"/>
<path id="all.java.path">
<pathelement location="${src.java.dir}" />
</path>
<path id="class.path">
<pathelement location="${common.classes.dir}" />
<pathelement location="${build.classes.dir}" />
<pathelement location="${server.classes.dir}" />
<pathelement location="${soap.classes.dir}" />
<pathelement location="${client.classes.dir}" />
<fileset dir="${jars.dir}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${common.jars.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${common.internal.jars.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- Targets -->
<target name="build-init">
<mkdir dir="${build.classes.dir}" />
<delete dir="${dist.dir}" failonerror="false" />
<mkdir dir="${dist.dir}/" />
<mkdir dir="${dist.dir}/zimbraim" />
</target>
<target name="compile" depends="build-init" description="Compiles the source code">
<ant dir="${common.dir}" target="jar" inheritAll="false" />
<ant dir="${client.dir}" target="jar" inheritAll="false" />
<javac destdir="${build.classes.dir}" debug="true" classpathref="class.path">
<src refid="all.java.path" />
</javac>
</target>
<target name="jar" depends="compile" description="Creates the jar file">
<antcall target="zimbra-jar">
<param name="implementation.title" value="Zimbra IM"/>
<param name="zimbra.extension.class" value="com.zimbra.cs.im.ZimbraIMExtension"/>
</antcall>
</target>
<target name="clean" description="Removes build files and undeploys extension">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" failonerror="false" />
</target>
<target name="deploy-dev" depends="stop-webserver,deploy-jar,start-webserver" description="Deploys the extension"/>
<target name="deploy-jar" depends="jar" description="Copies the jar file into the extension directory">
<copy file="${build.dir}/${jar.file}" tofile="${zimbraim.deploy.dir}/${jar.file}"/>
<copy todir="${zimbraim.deploy.dir}">
<fileset dir="${jars.dir}" includes="xmpp-*.jar" />
</copy>
</target>
<target name="start-webserver">
<ant dir="${server.dir}" target="start-webserver" inheritAll="false"/>
</target>
<target name="stop-webserver">
<ant dir="${server.dir}" target="stop-webserver" inheritAll="false"/>
</target>
<target name="dist" description="place output and all required jars into ./dist folder" depends="jar">
<copy file="${build.dir}/${jar.file}" tofile="${dist.dir}/zimbraim/${jar.file}"/>
<copy todir="${dist.dir}/zimbraim">
<fileset dir="${jars.dir}" includes="xmpp-*.jar" />
</copy>
</target>
</project>