I need to have the effect of MAVEN_OPTS="-server -Xms4G -Xmx4G" mvn clean verify -f pom.xml
with Jenkinsfile
.
The below does not work. What is the correct syntax for it?
withEnv(['MAVEN_OPTS="-server -Xms4G -Xmx4G"']) {
sh 'mvn clean verify -f pom.xml'
}
Just remove double quotes after the equals sign
withEnv(['MAVEN_OPTS=-server -Xms4G -Xmx4G']) {
sh 'mvn clean verify -f pom.xml'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With