-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
122 lines (104 loc) · 4.95 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="./" default="dist" name="UltimateSpeaker">
<!--ANT 1.7 is required -->
<dirname property="basedir" file="${ant.file.UltimateSpeaker}" />
<property name="distdir" value="${basedir}/Deploy" />
<property name="libsdir" value="${distdir}/libs" />
<property name="jarsdir" value="${distdir}/jars" />
<property name="releasedir" value="${distdir}/release" />
<property name="mainClass" value="com.aasenov.MainClass" />
<!--***************************************** Dependent projects declare section *****************************************-->
<property name="AdminUI.dir" value="AdminUI" />
<property name="AdminUI.buildfile" value="${AdminUI.dir}/build.xml" />
<import file="${AdminUI.buildfile}" optional="true" />
<property name="Data.dir" value="Data" />
<property name="Data.buildfile" value="${Data.dir}/build.xml" />
<import file="${Data.buildfile}" optional="true" />
<property name="Commons.dir" value="Commons" />
<property name="Commons.buildfile" value="${Commons.dir}/build.xml" />
<import file="${Commons.buildfile}" optional="true" />
<property name="RestAPI.dir" value="RestAPI" />
<property name="RestAPI.buildfile" value="${RestAPI.dir}/build.xml" />
<import file="${RestAPI.buildfile}" optional="true" />
<property name="SearchEngine.dir" value="SearchEngine" />
<property name="SearchEngine.buildfile" value="${SearchEngine.dir}/build.xml" />
<import file="${SearchEngine.buildfile}" optional="true" />
<property name="TextParse.dir" value="TextParse" />
<property name="TextParse.buildfile" value="${TextParse.dir}/build.xml" />
<import file="${TextParse.buildfile}" optional="true" />
<property name="TextSynthesis.dir" value="TextSynthesis" />
<property name="TextSynthesis.buildfile" value="${TextSynthesis.dir}/build.xml" />
<import file="${TextSynthesis.buildfile}" optional="true" />
<property name="RestletWadlExt.dir" value="RestletWadlExt" />
<property name="RestletWadlExt.buildfile" value="${RestletWadlExt.dir}/build.xml" />
<import file="${RestletWadlExt.buildfile}" optional="true" />
<!--***************************************** Dependent projects targets section *****************************************-->
<target depends="RestAPI, AdminUI.dist" name="AdminUI"/>
<target depends="Commons, Data.dist" name="Data"/>
<target depends="Commons.dist" name="Commons"/>
<target depends="Data, SearchEngine, TextParse, TextSynthesis, RestletWadlExt, RestAPI.dist" name="RestAPI"/>
<target depends="Commons, SearchEngine.dist" name="SearchEngine"/>
<target depends="TextParse.dist" name="TextParse"/>
<target depends="TextSynthesis.dist" name="TextSynthesis"/>
<target depends="RestletWadlExt.dist" name="RestletWadlExt"/>
<!--***************************************** Generate classpath section *****************************************-->
<!-- Include all dependency jars from libs folder. -->
<path id="classpath">
<fileset dir="${Commons.dir}/lib">
<include name="**/*.jar" />
</fileset>
</path>
<!-- convert classpath to a flat list/string for use in manifest task -->
<pathconvert property="mf.classpath" pathsep=" ">
<path refid="classpath" />
<flattenmapper />
</pathconvert>
<!--***************************************** Main targets section *****************************************-->
<target name="build" depends="init, AdminUI">
<!--Copy resources to dist -->
<copy todir="${releasedir}">
<fileset dir="${basedir}/AdminUI/src/main/resources">
<include name="*" />
</fileset>
</copy>
<!--Copy WebUI dist -->
<mkdir dir="${releasedir}/UI" />
<copy todir="${releasedir}/UI">
<fileset dir="${basedir}/WebUI/src/main/resources/UltimateSpeaker" />
</copy>
<!-- Prepare external libraries -->
<copy todir="${libsdir}" flatten="true">
<fileset dir="${Commons.dir}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${Commons.dir}/lib">
<include name="**/*.jar" />
</fileset>
</copy>
</target>
<target name="clean">
<echo>UltimateSpeaker : removing build directories</echo>
<delete dir="${distdir}" />
</target>
<!-- init target - Create the build and dist dirs folder structures -->
<target name="init" depends="clean">
<echo>UltimateSpeaker : creating build infrastructure</echo>
<tstamp />
<mkdir dir="${libsdir}" />
<mkdir dir="${jarsdir}" />
<mkdir dir="${releasedir}" />
</target>
<target name="dist" depends="build">
<jar destfile="${releasedir}/UltimateSpeaker.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader" />
<attribute name="Rsrc-Main-Class" value="${mainClass}" />
<attribute name="Class-Path" value="." />
<attribute name="Rsrc-Class-Path" value="./ ${mf.classpath}" />
</manifest>
<zipfileset src="jar-in-jar-loader.zip" />
<zipgroupfileset dir="${jarsdir}" includes="*.jar"/>
<zipfileset dir="${libsdir}/" includes="*.jar" />
</jar>
</target>
</project>