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 # This script builds a Maven project and deploys it into a staging repo which
13 # can be used to deploy elsewhere later eg. Nexus staging / snapshot repos.
15 # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
16 # Ensure we fail the job if any steps fail.
22 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
23 # shellcheck disable=SC2086
26 --global-settings "$GLOBAL_SETTINGS_FILE" \
27 --settings "$SETTINGS_FILE" \
28 -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \
29 $MAVEN_OPTIONS $MAVEN_PARAMS
31 # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
32 # shellcheck disable=SC2086
33 $MVN $SONAR_MAVEN_GOAL \
34 -e -Dsonar -Dsonar.host.url="$SONAR_HOST_URL" \
35 --global-settings "$GLOBAL_SETTINGS_FILE" \
36 --settings "$SETTINGS_FILE" \
37 -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \
38 $MAVEN_OPTIONS $MAVEN_PARAMS