强制java8编译

This commit is contained in:
2025-07-05 01:55:57 +08:00
parent 0e143a1c23
commit 59df0ef44c
2 changed files with 9 additions and 0 deletions

7
Jenkinsfile vendored
View File

@ -17,6 +17,13 @@ pipeline {
}
}
stage('Check Java Version') {
steps {
sh 'java -version'
sh 'javac -version'
}
}
stage('Build with Maven') {
steps {
echo "🛠️ 正在使用 Maven 构建..."

View File

@ -124,6 +124,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<!-- 强制使用 Java 8 模式编译 -->
<release>8</release>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>