-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.xml
More file actions
109 lines (90 loc) · 4.23 KB
/
build.xml
File metadata and controls
109 lines (90 loc) · 4.23 KB
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
<project name="Backbone Build" default="dist" basedir=".">
<description>
Apache ANT Buildfile for creating Backbone releases including all environments
</description>
<property name="dist" location="dist"/>
<!-- Maven Environment Setup -->
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isUnix">
<os family="unix" />
</condition>
<target name="mvn_windows" if="isWindows">
<property name="mvn.executable" value="cmd" />
<property name="mvn.args" value="/c" />
</target>
<target name="mvn_unix" if="isUnix">
<property name="mvn.executable" value="sh" />
<property name="mvn.args" value="-c" />
</target>
<!-- The actual target for running maven -->
<target name="run-mvn-goals" depends="mvn_windows, mvn_unix">
<exec dir="${basedir}" executable="${mvn.executable}">
<arg line="${mvn.args} 'mvn ${mvn_goals}'" />
</exec>
</target>
<!-- Main Build Process Begins Here -->
<!-- Create the build directory structure used by compile -->
<target name="init">
<mkdir dir="${dist}"/>
</target>
<!-- Generate shared binary distribution -->
<target name="exec-general-build" description="compiles non-platform-specific components" depends="init">
<antcall target="run-mvn-goals">
<param name="mvn_goals" value="clean install"/>
</antcall>
</target>
<target name="dist-general"
description="generate the distribution's non-platform specific structure" depends="exec-general-build">
<copydir src="Example-Backbone-Configs/src/main/resources" dest="${dist}/configs"/>
<copydir src="scripts" dest="${dist}"/>
<copy file="Plugin-Manager/target/plugin-manager.jar" tofile="${dist}/bin/Plugin-Manager.jar"/>
<mkdir dir="${dist}/modules"/>
<mkdir dir="${dist}/python_modules"/>
<mkdir dir="${dist}/resources"/>
<copy file="IO/target/Backbone-IO.jar" tofile="${dist}/modules/Backbone-IO.jar"/>
<copy file="Transforms/target/Backbone-Transforms.jar" tofile="${dist}/modules/Backbone-Transforms.jar"/>
</target>
<!-- Generate Flink Distribution -->
<target name="exec-flink" description="compiles flink components" depends="dist-general">
<antcall target="run-mvn-goals">
<param name="mvn_goals" value="clean install -P flink"/>
</antcall>
</target>
<target name="dist-flink" depends="exec-flink">
<copy file="Core/target/Backbone-Core-Flink.jar" tofile="${dist}/bin/Backbone-Core-Flink.jar"/>
</target>
<!-- Generate GCP Distribution -->
<target name="exec-gcp" description="compiles gcp components" depends="dist-flink">
<antcall target="run-mvn-goals">
<param name="mvn_goals" value="clean install -P gcp"/>
</antcall>
</target>
<target name="dist-gcp" depends="exec-gcp">
<copy file="Core/target/Backbone-Core-GCP.jar" tofile="${dist}/bin/Backbone-Core-GCP.jar"/>
</target>
<!-- Generate Spark Distribution -->
<target name="exec-spark" description="compiles spark components" depends="dist-gcp">
<antcall target="run-mvn-goals">
<param name="mvn_goals" value="clean install -P spark"/>
</antcall>
</target>
<target name="dist-spark" depends="exec-spark">
<copy file="Core/target/Backbone-Core-Spark.jar" tofile="${dist}/bin/Backbone-Core-Spark.jar"/>
</target>
<!-- Generate Spark Standalone Distribution -->
<target name="exec-spark-standalone" description="compiles spark standalone components" depends="dist-spark">
<antcall target="run-mvn-goals">
<param name="mvn_goals" value="clean install -P spark-standalone"/>
</antcall>
</target>
<target name="dist-spark-standalone" depends="exec-spark-standalone">
<copy file="Core/target/Backbone-Core-Spark-Standalone.jar" tofile="${dist}/bin/Backbone-Core-Spark-Standalone.jar"/>
</target>
<!-- General Final Distribution zip and cleanup -->
<target name="dist" depends="dist-spark-standalone">
<zip basedir="${dist}" destfile="Backbone.zip"/>
<delete dir="${dist}"/>
</target>
</project>