build: 使用jdk11运行
This commit is contained in:
parent
a959e16e22
commit
9141cb4866
|
@ -13,10 +13,14 @@ pipeline {
|
||||||
stage('Build/Test') {
|
stage('Build/Test') {
|
||||||
steps {
|
steps {
|
||||||
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
|
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 '''
|
||||||
sh 'java -version'
|
export JAVA_HOME=/opt/jdk-11
|
||||||
sh "./mvnw clean package --settings ./settings.xml"
|
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
|
||||||
sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)"
|
export PATH=$JAVA_HOME/bin:$PATH
|
||||||
|
java -version
|
||||||
|
./mvnw clean package --settings ./settings.xml
|
||||||
|
mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue