-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·59 lines (46 loc) · 1.55 KB
/
build.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
#!/bin/bash
date
set -x
# Compile libgc.so
cd core/src/main/java/
javac -classpath . com/gcinterceptor/core/GC.java || exit $?
javac -h . com/gcinterceptor/core/GC.java || exit $?
gcc -shared -fpic -I"${JAVA_HOME}/include" -I"${JAVA_HOME}/include/linux" ./com_gcinterceptor_core_GC.c -o ./libgc.so || exit $?
cd ../../../../
# Build GCI core
cd core/
rm -rf target/
mvn clean install || exit $?
cd ../
# Build GCI Agent
cd agent/
rm -rf target/
mvn clean package || exit $?
cd ../
# Build SpringGcInterceptor
cd spring/
rm -rf target/
mvn clean install || exit $?
cd ../
# Build GciPlugin for ES 6.4.0
cd elasticsearch-6.4.0-plugin/
rm -rf target/
mvn clean install || exit $?
cd ../
cp core/target/gci-core-0.1.jar elasticsearch-6.4.0-plugin/target/
cp elasticsearch-6.4.0-plugin/src/main/resources/plugin-descriptor.properties elasticsearch-6.4.0-plugin/target/
cd elasticsearch-6.4.0-plugin/target/
zip gci-elasticsearch-plugin.zip plugin-descriptor.properties gci-core-0.1.jar gci-elasticsearch-6.4.0-plugin-0.0.1-SNAPSHOT.jar
cd ../../
# Build GciPlugin for ES 5.5.3
cd elasticsearch-5.5.3-plugin/
rm -rf target/
mvn clean install || exit $?
cd ../
cp core/target/gci-core-0.1.jar elasticsearch-5.5.3-plugin/target/
cp elasticsearch-5.5.3-plugin/src/main/resources/plugin-descriptor.properties elasticsearch-5.5.3-plugin/target/
cd elasticsearch-5.5.3-plugin/target/
mkdir elasticsearch/
mv plugin-descriptor.properties gci-core-0.1.jar gci-elasticsearch-5.5.3-plugin-0.0.1-SNAPSHOT.jar elasticsearch/
zip -r gci-elasticsearch-plugin.zip elasticsearch/
cd ../../