build: 使用jdk11运行 (#11595)
* build: 使用jdk11运行 Co-authored-by: CaptainB <bin@fit2cloud.com>
This commit is contained in:
parent
89376d6843
commit
2536b974c9
|
@ -40,10 +40,10 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
java-version: 11
|
||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM metersphere/fabric8-java-alpine-openjdk8-jre
|
||||
FROM metersphere/fabric8-java-alpine-openjdk11-jre
|
||||
|
||||
LABEL maintainer="FIT2CLOUD <support@fit2cloud.com>"
|
||||
|
||||
|
|
|
@ -13,9 +13,7 @@ pipeline {
|
|||
stage('Build/Test') {
|
||||
steps {
|
||||
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
|
||||
// sh "cd frontend"
|
||||
// sh "yarn install"
|
||||
// sh "cd .."
|
||||
sh 'export JAVA_HOME=/usr/local/jdk-11;export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH;export PATH=$JAVA_HOME/bin:$PATH'
|
||||
sh "./mvnw clean package --settings ./settings.xml"
|
||||
sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<shiro.version>1.8.0</shiro.version>
|
||||
<java.version>1.8</java.version>
|
||||
<java.version>11</java.version>
|
||||
<flyway.version>7.15.0</flyway.version>
|
||||
</properties>
|
||||
|
||||
|
@ -405,8 +405,8 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>11</source>
|
||||
<target>11</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
|
Loading…
Reference in New Issue