3.2.1、全局工具配置
如果没有该选项,请按照ant插件

3.2.2、设置构建参数

3.2.2、jenkinsfile
#!groovyString buildShell = "${env.buildShell}" //引用参数pipeline {agent {node {label "master" //构建主机}}stages {stage("mvnBuild") {steps {script {mvnHome=tool "m2" //引用工具sh "${mvnHome}/bin/mvn ${buildShell}" //引用参数变量}}}stage("antBuild") {steps {script {AntHome=tool "ant" //引用工具sh "${AntHome}/bin/ant ${buildShell}" //引用参数变量}}}}}
