-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
76 lines (61 loc) · 2.84 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2017, 2021 Software AG, Darmstadt, Germany and/or its licensors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-->
<project default="copy" basedir="." name="Connectivity plugin build">
<presetdef name="javac">
<javac includeantruntime="false" />
</presetdef>
<property environment="env"/>
<property name="APAMA_HOME" location="${env.APAMA_HOME}"/>
<fail unless="env.APAMA_HOME" message="Please run the bin/apama_env script before attempting to build this sample."/>
<property name="output-dir" location="${basedir}/build-output"/>
<property name="output-jar" location="${output-dir}/regex-codec-sample.jar"/>
<tstamp/>
<!--
If the subdir exists use it (submodule or manual)
-->
<condition property="FileTransportBuildScript" value="FileTransport/build.xml">
<available file="${basedir}/FileTransport" type="dir"/>
</condition>
<!--
If the subdir !exists assume in source and that it is located adjacent to this basedir
-->
<condition property="FileTransportBuildScript" value="../FileTransport/build.xml">
<not> <available file="${basedir}/FileTransport" type="dir"/> </not>
</condition>
<import file="${FileTransportBuildScript}" />
<path id="plugin-classpath">
<fileset dir="${APAMA_HOME}/lib">
<include name ="connectivity-plugins-api.jar"/>
</fileset>
</path>
<pathconvert property="plugin-classpath.prop" refid="plugin-classpath" pathsep=" ">
<flattenmapper/>
</pathconvert>
<!-- Targets for building -->
<target name="build" description="Build plugin">
<delete dir="${output-dir}/work"/>
<mkdir dir="${output-dir}/work"/>
<javac srcdir="${basedir}/src" destdir="${output-dir}/work" debug="true">
<classpath refid="plugin-classpath"/>
</javac>
<jar jarfile="${output-jar}">
<fileset dir="${output-dir}/work" includes="**/*.class"/>
<manifest>
<attribute name="Implementation-Title" value="Regular Expressions Connectivity Codec Plug-in"/>
<attribute name="Implementation-Version" value="v1.0 (${TODAY})"/>
<attribute name="Class-Path" value="${plugin-classpath.prop}"/>
</manifest>
</jar>
</target>
<target name="copy" description="Build plugin and copy to APAMA_WORK/lib" depends="build, file-transport-copy">
<copy file="${output-jar}" todir="${env.APAMA_WORK}/lib/"/>
</target>
<target name="clean">
<delete dir="${output-dir}"/>
</target>
</project>