[No Jira] Explicitly specify maven and jdk on maven invocations because that seems it might be necessary for builds on (some?) Windows nodes.
// specific language governing permissions and limitations
// under the License.
-pipeline {
- agent any
+def MAVEN_VERSION = 'maven_latest'
+def JDK_VERSION = 'jdk_11_latest'
+pipeline {
tools {
- maven 'maven_latest'
- jdk 'jdk_11_latest'
+ maven MAVEN_VERSION
+ jdk JDK_VERSION
}
options {
@@ -70,7 +71,7 @@ pipeline {
': ' + env.CHANGE_BRANCH + '</a> (' + env.CHANGE_AUTHOR_DISPLAY_NAME + ')'
}
- withMaven() {
+ withMaven(maven: MAVEN_VERSION, jdk: JDK_VERSION) {
sh script: 'mvn ' +
params.extraMavenArguments +
' -U -Dmaven.test.failure.ignore=true clean verify'
@@ -92,7 +93,7 @@ pipeline {
when { branch pattern: "main|main-v2", comparator: "REGEXP" }
steps {
- withMaven() {
+ withMaven(maven: MAVEN_VERSION, jdk: JDK_VERSION) {
sh script: 'mvn ' +
params.extraMavenArguments +
' -U -Dmaven.test.failure.ignore=true clean deploy'
