-
Notifications
You must be signed in to change notification settings - Fork 42
/
compile.sh
executable file
·84 lines (72 loc) · 1.98 KB
/
compile.sh
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
#!/bin/bash
set -e
#Java executable for standard Linux environment
export JAVAC=javac
export JAR=jar
#Java executable for MinGW environment
#export JAVAC=/c/jdk9/bin/javac.exe
#export JAR=/c/jdk9/bin/jar.exe
echo "--- COMPILATION & PACKAGING ---"
echo " > creating clean directories"
rm -rf classes
mkdir classes
rm -rf mods
mkdir mods
echo " > creating monitor.observer"
$JAVAC \
-d classes/monitor.observer \
$(find monitor.observer -name '*.java')
$JAR --create \
--file mods/monitor.observer.jar \
-C classes/monitor.observer .
echo " > creating monitor.observer.alpha"
$JAVAC \
--module-path mods \
-d classes/monitor.observer.alpha \
$(find monitor.observer.alpha -name '*.java')
$JAR --create \
--file mods/monitor.observer.alpha.jar \
-C classes/monitor.observer.alpha .
echo " > creating monitor.observer.beta"
$JAVAC \
--module-path mods \
-d classes/monitor.observer.beta \
$(find monitor.observer.beta -name '*.java')
$JAR --create \
--file mods/monitor.observer.beta.jar \
-C classes/monitor.observer.beta .
echo " > creating monitor.statistics"
$JAVAC \
--module-path mods \
-d classes/monitor.statistics \
$(find monitor.statistics -name '*.java')
$JAR --create \
--file mods/monitor.statistics.jar \
-C classes/monitor.statistics .
echo " > creating monitor.persistence"
$JAVAC \
--module-path mods \
-d classes/monitor.persistence \
$(find monitor.persistence -name '*.java')
$JAR --create \
--file mods/monitor.persistence.jar \
-C classes/monitor.persistence .
echo " > creating monitor.rest"
# spark is required as an automatic module, so copy it to mods
cp libs/spark-core-* mods/spark.core.jar
$JAVAC \
--module-path mods \
-d classes/monitor.rest \
$(find monitor.rest -name '*.java')
$JAR --create \
--file mods/monitor.rest.jar \
-C classes/monitor.rest .
echo " > creating monitor"
$JAVAC \
--module-path mods \
-d classes/monitor \
$(find monitor -name '*.java')
$JAR --create \
--file mods/monitor.jar \
--main-class monitor.Main \
-C classes/monitor .