-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-docker.xml
More file actions
121 lines (101 loc) · 4.97 KB
/
build-docker.xml
File metadata and controls
121 lines (101 loc) · 4.97 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
110
111
112
113
114
115
116
117
118
119
120
121
<project name="LocalProcessModelDiscoveryByCombiningPlaces"
default="make"
basedir="."
xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- Define properties -->
<property name="src.dir" value="src"/>
<property name="bin.dir" value="bin"/>
<property name="dist.dir" value="dist"/>
<property name="manifest.file" value="${basedir}/META-INF/MANIFEST-clustering.MF"/>
<property name="lib.dir" value="dist/lib"/>
<property name="ivy.install.version" value="2.1.0-rc2" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<target name="download-ivy" unless="offline">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="init-ivy" depends="download-ivy">
<!-- try to load ivy here from ivy home, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<!-- Target for retrieving dependencies -->
<target name="retrieve">
<mkdir dir="${lib.dir}"/> <!-- Ensure lib directory exists -->
<ivy:retrieve type="jar,bundle" sync="true" haltonfailure="false" />
<ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]" conf="lib,default" type="jar,bundle"
sync="true"/>
</target>
<!-- Target for compiling Java source files -->
<target name="compile">
<mkdir dir="${bin.dir}"/>
<javac srcdir="${src.dir}" destdir="${bin.dir}">
<classpath>
<!-- Include all JARs from the lib directory (retrieved by Ivy) -->
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="set-classpath" depends="retrieve, compile">
<manifestclasspath property="jar.classpath" jarfile="${dist.dir}/lpm-discovery.jar">
<classpath>
<fileset dir="${lib.dir}" includes="*.jar"/>
</classpath>
</manifestclasspath>
</target>
<!-- Target for creating the clustering JAR file with manifest -->
<target name="make-clust" depends="set-classpath">
<jar jarfile="${dist.dir}/lpm-clustering.jar" basedir="${bin.dir}">
<manifest>
<attribute name="Main-Class" value="org.processmining.placebasedlpmdiscovery.runners.clustering.LPMClusteringRunner"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
<!-- Optionally print success message -->
<echo message="JAR created successfully for clustering"/>
</target>
<!-- Target for creating the JAR file with manifest -->
<target name="make-discovery" depends="set-classpath">
<jar jarfile="${dist.dir}/lpm-discovery.jar" basedir="${bin.dir}">
<manifest>
<attribute name="Main-Class"
value="org.processmining.placebasedlpmdiscovery.runners.lpmdiscovery.LPMDiscoveryRunner"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
<!-- Optionally print success message -->
<echo message="JAR created successfully for discovery"/>
</target>
<target name="make-dist" depends="set-classpath">
<jar jarfile="${dist.dir}/lpm-distance.jar" basedir="${bin.dir}">
<manifest>
<attribute name="Main-Class"
value="org.processmining.placebasedlpmdiscovery.runners.distancerunner.DistanceComputationRunner"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
<!-- Optionally print success message -->
<echo message="JAR created successfully for clustering"/>
</target>
<target name="make" depends="make-clust, make-discovery, make-dist"/>
<target name="clean">
<echo message="[build] Cleaning binaries and distributions" />
<delete dir="${bin.dir}" />
<delete dir="${dist.dir}" />
</target>
</project>