build: 使用jdk11运行

This commit is contained in:
CaptainB 2022-03-17 19:34:59 +08:00
parent 5df6a4db92
commit eeda38ce14
1 changed files with 1 additions and 0 deletions

1
Jenkinsfile vendored
View File

@ -14,6 +14,7 @@ pipeline {
steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
sh 'export JAVA_HOME=/opt/jdk-11;export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH;export PATH=$JAVA_HOME/bin:$PATH'
sh 'java -version'
sh "./mvnw clean package --settings ./settings.xml"
sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)"
}