From: Thanh Ha Date: Thu, 28 Dec 2017 17:21:27 +0000 (-0500) Subject: Prioritize MAVEN_PARAMS to override OPTIONS X-Git-Tag: v0.13.1~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=89c7b0f2fa145a7016ba24955e8f57309e9295c8;p=releng%2Fglobal-jjb.git Prioritize MAVEN_PARAMS to override OPTIONS MAVEN_PARAMS (user defined) can override MAVEN_OPTIONS (gjjb defined) but only if it comes last on the CLI. Re-shuffle the variables so that the desired prioritization can take affect. RT 50181 Change-Id: Ib79cf11625e9b2d1f279b721f3a90a31e04020dc Signed-off-by: Thanh Ha --- diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-clm-master b/.jjb-test/expected-xml/gerrit-maven-maven-clm-master index c9ad3ca8..e028a8a0 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-clm-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-clm-master @@ -238,7 +238,7 @@ $MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master index 8efd314b..6c3e0a1c 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-publish-master @@ -325,7 +325,7 @@ $MVN clean install javadoc:aggregate \ -Dfindbugs.skip=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS mv "$WORKSPACE/target/site/apidocs" "$JAVADOC_DIR" diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master index 961c75db..d7f6d756 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-javadoc-verify-master @@ -291,7 +291,7 @@ $MVN clean install javadoc:aggregate \ -Dfindbugs.skip=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS mv "$WORKSPACE/target/site/apidocs" "$JAVADOC_DIR" diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-merge-master b/.jjb-test/expected-xml/gerrit-maven-maven-merge-master index ef875136..f64dc74a 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-merge-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-merge-master @@ -465,7 +465,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS #!/bin/bash # SPDX-License-Identifier: EPL-1.0 diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-release-master b/.jjb-test/expected-xml/gerrit-maven-maven-release-master index 568bdf40..58e56b1f 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-release-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-release-master @@ -434,7 +434,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS #!/bin/bash # SPDX-License-Identifier: EPL-1.0 diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 b/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 index e49032c4..107f2cee 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 +++ b/.jjb-test/expected-xml/gerrit-maven-maven-verify-deps-master-mvn33-openjdk8 @@ -354,7 +354,7 @@ for project in "${PROJECTS[@]}"; do -DskipTests=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS popd done @@ -410,7 +410,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 b/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 index 38a8f9a0..45f4d4af 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 +++ b/.jjb-test/expected-xml/gerrit-maven-maven-verify-master-mvn33-openjdk8 @@ -381,7 +381,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/.jjb-test/expected-xml/gerrit-maven-sonar b/.jjb-test/expected-xml/gerrit-maven-sonar index 6e038933..e48e5e39 100644 --- a/.jjb-test/expected-xml/gerrit-maven-sonar +++ b/.jjb-test/expected-xml/gerrit-maven-sonar @@ -291,7 +291,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters. # shellcheck disable=SC2086 @@ -300,7 +300,7 @@ $MVN $SONAR_MAVEN_GOAL \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/.jjb-test/expected-xml/github-maven-maven-clm-master b/.jjb-test/expected-xml/github-maven-maven-clm-master index d93f7611..ddd663c5 100644 --- a/.jjb-test/expected-xml/github-maven-maven-clm-master +++ b/.jjb-test/expected-xml/github-maven-maven-clm-master @@ -233,7 +233,7 @@ $MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master b/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master index 38d4650b..07cf871e 100644 --- a/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master +++ b/.jjb-test/expected-xml/github-maven-maven-javadoc-publish-master @@ -301,7 +301,7 @@ $MVN clean install javadoc:aggregate \ -Dfindbugs.skip=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS mv "$WORKSPACE/target/site/apidocs" "$JAVADOC_DIR" diff --git a/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master b/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master index 8a098900..6c573c6d 100644 --- a/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master +++ b/.jjb-test/expected-xml/github-maven-maven-javadoc-verify-master @@ -253,7 +253,7 @@ $MVN clean install javadoc:aggregate \ -Dfindbugs.skip=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS mv "$WORKSPACE/target/site/apidocs" "$JAVADOC_DIR" diff --git a/.jjb-test/expected-xml/github-maven-maven-merge-master b/.jjb-test/expected-xml/github-maven-maven-merge-master index 6f84d99d..f5e708cd 100644 --- a/.jjb-test/expected-xml/github-maven-maven-merge-master +++ b/.jjb-test/expected-xml/github-maven-maven-merge-master @@ -423,7 +423,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS #!/bin/bash # SPDX-License-Identifier: EPL-1.0 diff --git a/.jjb-test/expected-xml/github-maven-maven-release-master b/.jjb-test/expected-xml/github-maven-maven-release-master index 2b675742..4406105e 100644 --- a/.jjb-test/expected-xml/github-maven-maven-release-master +++ b/.jjb-test/expected-xml/github-maven-maven-release-master @@ -402,7 +402,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS #!/bin/bash # SPDX-License-Identifier: EPL-1.0 diff --git a/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 b/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 index b859508e..1cc1c19e 100644 --- a/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 +++ b/.jjb-test/expected-xml/github-maven-maven-verify-master-mvn33-openjdk8 @@ -337,7 +337,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/.jjb-test/expected-xml/github-maven-sonar b/.jjb-test/expected-xml/github-maven-sonar index 710c2ec8..13a3a85b 100644 --- a/.jjb-test/expected-xml/github-maven-sonar +++ b/.jjb-test/expected-xml/github-maven-sonar @@ -256,7 +256,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters. # shellcheck disable=SC2086 @@ -265,7 +265,7 @@ $MVN $SONAR_MAVEN_GOAL \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/shell/deploy-maven-file.sh b/shell/deploy-maven-file.sh index dfb9a5aa..338a8c30 100644 --- a/shell/deploy-maven-file.sh +++ b/shell/deploy-maven-file.sh @@ -44,6 +44,6 @@ do "$file" \ -b "$MVN" \ -g "$GROUP_ID" \ - -p "$MAVEN_PARAMS $MAVEN_OPTIONS" \ + -p "$MAVEN_OPTIONS $MAVEN_PARAMS" \ |& tee "$DEPLOY_LOG" done < <(find "$UPLOAD_FILES_PATH" -type f -name "*") diff --git a/shell/maven-build-deps.sh b/shell/maven-build-deps.sh index fdb29b2b..bf53bf54 100644 --- a/shell/maven-build-deps.sh +++ b/shell/maven-build-deps.sh @@ -34,6 +34,6 @@ for project in "${PROJECTS[@]}"; do -DskipTests=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS popd done diff --git a/shell/maven-build.sh b/shell/maven-build.sh index 0928c123..45851380 100644 --- a/shell/maven-build.sh +++ b/shell/maven-build.sh @@ -25,4 +25,4 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 02a49e30..6199b4d7 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -30,6 +30,6 @@ $MVN clean install javadoc:aggregate \ -Dfindbugs.skip=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS mv "$WORKSPACE/target/site/apidocs" "$JAVADOC_DIR" diff --git a/shell/maven-sonar.sh b/shell/maven-sonar.sh index 4a3bdb87..525125b1 100644 --- a/shell/maven-sonar.sh +++ b/shell/maven-sonar.sh @@ -26,7 +26,7 @@ $MVN clean deploy \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters. # shellcheck disable=SC2086 @@ -35,4 +35,4 @@ $MVN $SONAR_MAVEN_GOAL \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS diff --git a/shell/sonatype-clm.sh b/shell/sonatype-clm.sh index 4cfdfb5b..3be390dd 100644 --- a/shell/sonatype-clm.sh +++ b/shell/sonatype-clm.sh @@ -25,4 +25,4 @@ $MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \ - $MAVEN_PARAMS $MAVEN_OPTIONS + $MAVEN_OPTIONS $MAVEN_PARAMS