-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
52 lines (42 loc) · 2.26 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
<?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="file-transport-copy" name="FileTransport">
<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."/>
<dirname property="file-transport-source-dir" file="${ant.file.FileTransport}"/>
<property name="file-transport-output-dir" location="${file-transport-source-dir}/build-output"/>
<property name="file-transport-output-jar" location="${file-transport-output-dir}/file-transport-plugins.jar"/>
<!-- Compiles .class files -->
<target name="file-transport-compile">
<mkdir dir="${file-transport-output-dir}/work"/>
<javac srcdir="${file-transport-source-dir}/src/" destdir="${file-transport-output-dir}/work" debug="true">
<compilerarg value="-Xlint"/>
<compilerarg value="-Werror"/>
<classpath>
<pathelement path="${env.APAMA_HOME}/lib/connectivity-plugins-api.jar"/>
</classpath>
</javac>
</target>
<!-- Make the jar from .class files -->
<target name="file-transport-jars" depends="file-transport-compile">
<jar jarfile="${file-transport-output-jar}">
<fileset dir="${file-transport-output-dir}/work"/>
</jar>
</target>
<target name="file-transport-copy" description="Build plugins and copy to APAMA_WORK/lib" depends="file-transport-jars">
<copy file="${file-transport-output-jar}" todir="${env.APAMA_WORK}/lib/"/>
</target>
<!-- Erase everything we built -->
<target name="clean">
<delete dir="${file-transport-output-dir}"/>
</target>
</project>