From 8c120f0669c3831c1e9dc76f06b1101ccfc9a15f Mon Sep 17 00:00:00 2001
From: Sonia Zorba <zorba@oats.inaf.it>
Date: Fri, 26 Jan 2018 12:19:25 +0100
Subject: [PATCH] Fixed build.sh e gitlab-ci after creation of TASMAN-bom

---
 .gitlab-ci.yml | 2 +-
 README.md      | 2 ++
 build.sh       | 8 ++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ba91c93..ca4bd04 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,2 +1,2 @@
 build:
-  script: "cd TASMAN-core; mvn clean install -P Test -Dmysql_host=localhost -Dmysql_port=3306 -Dmysql_user=tasman_tester -D mysql_password=tasman_tester -Dpostgres_host=localhost -Dpostgres_port=5432 -Dpostgres_user=tasman_tester -Dpostgres_password=tasman_tester -Dpostgres_database=tasman_test"
+  script: "cd TASMAN-bom; mvn clean install; cd ../TASMAN-core; mvn clean install -P Test -Dmysql_host=localhost -Dmysql_port=3306 -Dmysql_user=tasman_tester -D mysql_password=tasman_tester -Dpostgres_host=localhost -Dpostgres_port=5432 -Dpostgres_user=tasman_tester -Dpostgres_password=tasman_tester -Dpostgres_database=tasman_test"
diff --git a/README.md b/README.md
index 9648d38..ce5ddfb 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,8 @@ See also the [CHANGELOG](CHANGELOG.md).
 3. `./build.sh <command>`, commands are:
     * **core** build only TASMAN core
     * **test**: run tests; you need to create a `test.properties` file containing a configuration for connecting to a MySQL and a Postgres test database
+        * MySQL testing database needs to have `default-storage-engine = innodb` configured into `/etc/my.cnf`
+        * Postgres 9.3+ is required
     * **glassfish**: build GlassFish war package
     * **tomcat**: build Tomcat war package (using config.properties file)
     * **embedded**: build embedded package (to be run _locally!_)
diff --git a/build.sh b/build.sh
index 2333fab..68dbc97 100755
--- a/build.sh
+++ b/build.sh
@@ -24,7 +24,9 @@ function add_properties {
 }
 
 function build_core {
-  cd TASMAN-core
+  cd TASMAN-bom
+  mvn -q clean install
+  cd ../TASMAN-core
   mvn -q clean install
   if [ "$?" -ne 0 ]; then
     echo "[ERROR] Error in ${FUNCNAME[0]}"
@@ -35,7 +37,9 @@ function build_core {
 }
 
 function test_core {
-  cd TASMAN-core
+  cd TASMAN-bom
+  mvn -q clean install
+  cd ../TASMAN-core
   $(add_properties "mvn clean install -P test" $test_config_file)
   if [ "$?" -ne 0 ]; then
     echo "[ERROR] Error in ${FUNCNAME[0]}"
-- 
GitLab