-
Notifications
You must be signed in to change notification settings - Fork 146
/
compile.sh
executable file
·123 lines (101 loc) · 3.41 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
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
122
123
#!/bin/bash
echo "--- Checking for Java 9 ---"
source ../../common-functions.sh
echo "--- Java 9 found ---"
java -version
echo ""
echo "--- COMPILATION & PACKAGING ---"
echo " > adding symbolic links to Java command(s) ---"
ln -f -s $(which java) java9
ln -f -s $(which javac) javac9
ln -f -s $(which jar) jar9
echo " > creating clean directories"
rm -rf build
mkdir build
mkdir build/classes
mkdir build/jars
mkdir build/class-path
mkdir build/module-path
cp deps/* build/class-path
echo " > creating monitor.utils"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor.utils \
$(find monitor.utils/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.utils.jar \
-C build/classes/monitor.utils .
cp build/jars/monitor.utils.jar build/class-path
echo " > creating monitor.observer"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor.observer \
$(find monitor.observer/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.observer.jar \
-C build/classes/monitor.observer .
cp build/jars/monitor.observer.jar build/class-path
echo " > creating monitor.observer.alpha"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor.observer.alpha \
$(find monitor.observer.alpha/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.observer.alpha.jar \
-C build/classes/monitor.observer.alpha .
cp build/jars/monitor.observer.alpha.jar build/class-path
echo " > creating monitor.observer.beta"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor.observer.beta \
$(find monitor.observer.beta/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.observer.beta.jar \
-C build/classes/monitor.observer.beta .
cp build/jars/monitor.observer.beta.jar build/class-path
echo " > creating monitor.statistics"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor.statistics \
$(find monitor.statistics/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.statistics.jar \
-C build/classes/monitor.statistics .
cp build/jars/monitor.statistics.jar build/class-path
echo " > creating monitor.persistence"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor.persistence \
$(find monitor.persistence/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.persistence.jar \
-C build/classes/monitor.persistence .
cp build/jars/monitor.persistence.jar build/class-path
echo " > creating monitor.rest"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
--add-modules java.xml.bind,java.xml.ws.annotation \
--patch-module java.xml.ws.annotation=build/class-path/jsr305-3.0.2.jar \
-d build/classes/monitor.rest \
$(find monitor.rest/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.rest.jar \
-C build/classes/monitor.rest .
cp build/jars/monitor.rest.jar build/class-path
echo " > creating monitor"
javac9 \
--class-path 'build/class-path/*' \
--module-path build/module-path \
-d build/classes/monitor \
$(find monitor/src/main/java -name '*.java')
jar9 --create \
--file build/jars/monitor.jar \
-C build/classes/monitor .
cp build/jars/monitor.jar build/class-path