强制java8编译
This commit is contained in:
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@ -17,6 +17,13 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Check Java Version') {
|
||||||
|
steps {
|
||||||
|
sh 'java -version'
|
||||||
|
sh 'javac -version'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Build with Maven') {
|
stage('Build with Maven') {
|
||||||
steps {
|
steps {
|
||||||
echo "🛠️ 正在使用 Maven 构建..."
|
echo "🛠️ 正在使用 Maven 构建..."
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@ -124,6 +124,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.10.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<!-- 强制使用 Java 8 模式编译 -->
|
||||||
|
<release>8</release>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
Reference in New Issue
Block a user