Merge "Bump transportpce-models upstream dependency"
[transportpce.git] / tests / build_controller.sh
1 #!/bin/sh
2
3 set -e
4
5 current_dir=$PWD
6
7 cd $(dirname $0)
8
9 #install maven and JDK11 on the Gate since they are not there by default
10 which mvn >/dev/null || ./installMavenCentOS.sh
11 cd ../
12
13 if [ "$USE_LIGHTY" != "True" ]; then
14     for suffix in 121 221 71 _hybrid; do
15         rm -rf "karaf$suffix"
16         cp -r karaf "karaf$suffix"
17     done
18 fi
19
20 #build controller, source JDK_JAVA_OPTIONS to remove illegal reflective acces warnings introduced by Java11
21 . "$current_dir"/reflectwarn.sh
22 mvn clean install -B -q -s tests/odl_settings.xml -Pq
23
24 #patch Karaf exec for the same reason at runtime and also to have the possibility to use alternative ports
25 ./karaf/target/assembly/ressources/post_install_for_tests.sh
26
27 #build Lighty if needed
28 if [ "$USE_LIGHTY" = "True" ]; then
29     cd lighty
30     ./build.sh
31 fi