forked from sgsinclair/VoyantServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
94 lines (82 loc) · 2.65 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
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0"?>
<project name="JettyDesktop" default="jar">
<!-- Src directories -->
<property name="src" location="src"/>
<!-- Build directories -->
<property name="build" location="./bin"/>
<!-- Output directories -->
<property name="rootdist" location="dist"/>
<property name="dist" location="dist/VoyantServer2_4-M5pr4"/>
<property name="jarpath" location="lib"/>
<path id="project.jars">
<fileset dir="${jarpath}" includes="*.jar" />
</path>
<path id="project.class.path">
<pathelement location="${build}"/>
</path>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="clean">
<delete dir="${rootdist}"/>
<delete dir="${build}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}" optimize="on" debug="on">
<classpath>
<path refid="project.class.path"/>
<path refid="project.jars"/>
</classpath>
</javac>
<copy file="${src}/org/aw20/logo/aw20.jpg" todir="${build}/org/aw20/logo/"/>
<copy file="${src}/org/voyanttools/resources/voyant_small.png" todir="${build}/org/voyanttools/resources/"/>
<copy file="${src}/org/aw20/jettydesktop/rte/webdefault.xml" todir="${build}/org/aw20/jettydesktop/rte"/>
</target>
<target name="buildbase">
<jar jarfile="${dist}/VoyantServer.jar"
filesonly="true"
compress="true">
<fileset dir="${build}" />
<zipgroupfileset dir="${jarpath}" includes="*.jar" />
<manifest>
<attribute name="Main-Class" value="org.voyanttools.server.ui.VoyantServerStart"/>
</manifest>
</jar>
<!-- be sure to grab Trombone classes -->
<copy todir="${dist}/_app/WEB-INF/classes">
<!-- hard-code location unfortunately -->
<fileset dir="${src}/../../trombone/target/classes"/>
</copy>
<copy file="./server-settings.txt" todir="${dist}/"/>
<copy file="./license-GPL3.txt" todir="${dist}/"/>
<copy file="./README.md" todir="${dist}/"/>
<copy todir="${dist}/data">
<fileset dir="data"/>
</copy>
</target>
<target name="bigjar" depends="clean,compile,buildbase">
<copy todir="${dist}/_app">
<fileset dir="_app">
<exclude name="**/trombone*.jar"/>
</fileset>
</copy>
<zip destfile="VoyantServerWithModels.zip"
filesonly="true"
compress="true">
<fileset dir="${rootdist}" />
</zip>
</target>
<target name="jar" depends="clean,compile,buildbase">
<copy todir="${dist}/_app">
<fileset dir="_app">
<exclude name="**/stanford*models.jar"/>
<exclude name="**/trombone*.jar"/>
</fileset>
</copy>
<zip destfile="${rootdist}/VoyantServer2_4-M5pr4.zip"
filesonly="true"
compress="true">
<fileset dir="${rootdist}" />
</zip>
</target>
</project>