2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
12 # Builds projects provided via $DEPENDENCY_BUILD_ORDER list
14 # This runs a `mvn clean install` against all projects provided by a list. This
15 # script is a companion script for the gerrit-fetch-dependencies script which
16 # clones project repos to "$WORKSPACE/.repos".
18 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
19 # Ensure we fail the job if any steps fail.
23 IFS=" " read -r -a PROJECTS <<< "$DEPENDENCY_BUILD_ORDER"
24 REPOS_DIR="$WORKSPACE/.repos"
28 for project in "${PROJECTS[@]}"; do
29 pushd "$REPOS_DIR/$project"
30 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
31 # shellcheck disable=SC2086
35 --global-settings "$GLOBAL_SETTINGS_FILE" \
36 --settings "$SETTINGS_FILE" \
37 $MAVEN_OPTIONS $MAVEN_PARAMS