-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
147 lines (128 loc) · 5.47 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="package" name="SageAPI">
<property environment="env" />
<!-- Put Host specific properties here, ie sage path, bmt path, etc -->
<property file="${user.home}/AntCommon/build.properties" />
<!-- sage.lib.dir should be defined in the build.properties -->
<!-- <property name="sage.lib.dir"/> -->
<!-- bmt.lib.dir should be defined in the build.properties -->
<!-- <property name="bmt.lib.dir"/> -->
<!-- bmt.core.lib should be defined in the build.properties -->
<!-- <property name="bmt.core.lib"/> -->
<!-- Configure path to GWT SDK in the build .properties -->
<!-- <property name="gwt.sdk" location="" /> -->
<property name="src.dir" location="src/main/java" />
<property name="gen.dir" location="src/generated/java" />
<property name="target" location="target" />
<property name="build.dir" location="${target}/build" />
<property name="dist.dir" location="${target}/dist" />
<property name="name" value="sagex-api" />
<property name="version" value="9.2.8.1" />
<property name="jarname" value="${name}.jar" />
<!-- should be no more api updates -->
<!-- <property name="createAPI" value="true"/> -->
<property name="createJAVADOC" value="true" />
<path id="SageAPI.classpath">
<pathelement location="bin" />
<pathelement location="build/classes" />
<pathelement location="build/" />
<fileset dir="lib" includes="*.jar" />
</path>
<path id="AppClasspath">
<pathelement location="target/classes" />
<fileset dir="lib" includes="*.jar" />
</path>
<!--
- Create a war file for the /root web application (list of running applications).
-->
<target name="war">
<mkdir dir="${build.dir}/war" />
<copy todir="${build.dir}/war" includeemptydirs="true">
<fileset dir="WebContent">
<exclude name=".directory"/> <!-- KDE artifact -->
</fileset>
</copy>
<war basedir="${build.dir}/war/sagex"
destfile="${build.dir}/sagex.war"
manifest="${build.dir}/war/sagex/META-INF/MANIFEST.MF"
webxml="${build.dir}/war/sagex/WEB-INF/web.xml"
>
<manifest>
<attribute name="Specification-Title" value="Sage API Extension"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="Sage API Extension"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</war>
</target>
<target name="package" depends="init,build,war,makeJar,javadoc,package-javadoc">
<mkdir dir="${build.dir}/sage/jetty/contexts/" />
<mkdir dir="${build.dir}/sage/sagex/services/" />
<copy file="src/main/jetty/contexts/sagex.xml" todir="${build.dir}/sage/jetty/contexts/" />
<copy file="src/main/services/sagex.js" todir="${build.dir}/sage/sagex/services/" />
<zip file="${target}/${name}-${version}.zip">
<fileset dir="${target}/build/sage" includes="**/**" />
</zip>
</target>
<target name="build" depends="">
<mkdir dir="target/classes/jetty" />
<copy todir="target/classes/jetty">
<fileset dir="src/main/jetty" includes="**/*.xml" />
</copy>
<copy todir="target/classes">
<fileset dir="${src.dir}" excludes="**/*.java" />
</copy>
<javac debug="true" classpathref="AppClasspath" source="1.8" target="1.8" srcdir="${src.dir}" destdir="target/classes">
</javac>
</target>
<target name="makeJar">
<mkdir dir="${build.dir}/sage/JARs" />
<jar destfile="${build.dir}/sage/JARs/${jarname}">
<fileset dir="target/classes" includes="sagex/**,jetty/**" />
<fileset dir="${src.dir}" includes="sagex-api.log4j.properties" />
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Specification-Title" value="Sage API Extension" />
<attribute name="Specification-Version" value="${version} ${TODAY}" />
<attribute name="Specification-Vendor" value="Sean Stuckless" />
<attribute name="Implementation-Title" value="Sage API Extension" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Implementation-Vendor" value="Sean Stuckless" />
</manifest>
</jar>
<copy file="${build.dir}/sage/JARs/${jarname}" todir="target" failonerror="false" />
<copy file="${build.dir}/sage/JARs/${jarname}" tofile="${target}/sagex-api-${version}.jar" failonerror="false" />
<!-- update the MovieMetadata project, if it exists -->
<copy file="${build.dir}/sage/JARs/${jarname}" todir="../MovieMetadataUpdater/lib/" failonerror="false" />
<copy file="${build.dir}/sage/JARs/${jarname}" todir="../Phoenix/lib/" failonerror="false" />
</target>
<target name="init" depends="clean">
<!-- <delete dir="cache" failonerror="false"/> -->
<mkdir dir="${target}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/sage" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${dist.dir}/packages" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="${src.dir}" excludes="**/*.launch, **/*.java" />
</copy>
</target>
<target name="clean">
<delete dir="target" />
</target>
<target name="javadoc" if="createJAVADOC">
<mkdir dir="target/docs/${name}/api" />
<javadoc author="true" destdir="target/docs/" classpathref="AppClasspath">
<fileset dir="${src.dir}" excludes="**/*.properties,**/*.json" />
<header>
<![CDATA[SageTV Java and Remote APIs]]>
</header>
<bottom>${version}</bottom>
</javadoc>
</target>
<target name="package-javadoc" if="createJAVADOC">
<zip destfile="${target}/${name}-javadoc-${version}.zip">
<zipfileset dir="target/docs/" prefix="sagex-api-javadoc" />
</zip>
</target>
</project>