Skip to content

Commit b88f8a8

Browse files
committed
Enable maven multi-thread build
Signed-off-by: Olivier Perrin <[email protected]>
1 parent 4efd96d commit b88f8a8

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

scripts/release_train/build_snapshot.sh

+14-7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CLONE_OPT="--filter=blob:none"
66
SET_PROPERTY_OPT="-DgenerateBackupPoms=false -q"
77
HELP_EVAL_OPT="-q -DforceStdout"
88

9+
BUILD_OPT="-T1C"
910
TEST_OPT=""
1011

1112
MVN="mvn -Dmaven.repo.local=$BUILD_DIR/m2_repository"
@@ -49,6 +50,7 @@ function usage() {
4950
echo " - \"NONE\": don't build anything (but retrieve the missing repos)"
5051
echo " Possible options:"
5152
echo " * --skip-tests: skip tests"
53+
echo " * --mono-thread: maven build on single thread"
5254
}
5355

5456
function success() {
@@ -71,6 +73,11 @@ case $key in
7173
echo "-> skipping tests"
7274
shift # past argument
7375
;;
76+
--mono-thread)
77+
BUILD_OPT=""
78+
echo "-> maven build on single thread"
79+
shift # past argument
80+
;;
7481
*) # unknown option
7582
POSITIONAL+=("$1") # save it in an array for later
7683
shift # past argument
@@ -274,7 +281,7 @@ pause
274281
if [ $START_FROM -lt 1 ]
275282
then
276283
cd powsybl-core
277-
$MVN -batch-mode --no-transfer-progress clean install -DskipTests
284+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT -DskipTests
278285
if [[ "$?" -ne 0 ]] ; then
279286
exit 1
280287
fi
@@ -283,7 +290,7 @@ fi
283290
if [ $START_FROM -lt 2 ]
284291
then
285292
cd powsybl-open-loadflow
286-
$MVN -batch-mode --no-transfer-progress clean install $TEST_OPT
293+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT $TEST_OPT
287294
if [[ "$?" -ne 0 ]] ; then
288295
exit 1
289296
fi
@@ -292,7 +299,7 @@ fi
292299
if [ $START_FROM -lt 3 ]
293300
then
294301
cd powsybl-diagram
295-
$MVN -batch-mode --no-transfer-progress clean install $TEST_OPT
302+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT $TEST_OPT
296303
if [[ "$?" -ne 0 ]] ; then
297304
exit 1
298305
fi
@@ -301,7 +308,7 @@ fi
301308
if [ $START_FROM -lt 4 ]
302309
then
303310
cd powsybl-entsoe
304-
$MVN -batch-mode --no-transfer-progress clean install $TEST_OPT
311+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT $TEST_OPT
305312
if [[ "$?" -ne 0 ]] ; then
306313
exit 1
307314
fi
@@ -310,7 +317,7 @@ fi
310317
if [ $START_FROM -lt 5 ]
311318
then
312319
cd powsybl-open-rao
313-
$MVN -batch-mode --no-transfer-progress clean install $TEST_OPT
320+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT $TEST_OPT
314321
if [[ "$?" -ne 0 ]] ; then
315322
exit 1
316323
fi
@@ -319,7 +326,7 @@ fi
319326
if [ $START_FROM -lt 6 ]
320327
then
321328
cd powsybl-dynawo
322-
$MVN -batch-mode --no-transfer-progress clean install $TEST_OPT
329+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT $TEST_OPT
323330
if [[ "$?" -ne 0 ]] ; then
324331
exit 1
325332
fi
@@ -328,7 +335,7 @@ fi
328335
if [ $START_FROM -lt 7 ]
329336
then
330337
cd powsybl-dependencies
331-
$MVN -batch-mode --no-transfer-progress clean install $TEST_OPT
338+
$MVN -batch-mode --no-transfer-progress clean install $BUILD_OPT $TEST_OPT
332339
if [[ "$?" -ne 0 ]] ; then
333340
exit 1
334341
fi

0 commit comments

Comments
 (0)