This is an automated email from the ASF dual-hosted git repository.

kunni pushed a commit to branch FLINK-38730-copy
in repository https://gitbox.apache.org/repos/asf/flink-cdc.git

commit c38d78e51a93be3efd9ff952abe9fc2a04809090
Author: lvyanquan <[email protected]>
AuthorDate: Wed Dec 3 20:55:50 2025 +0800

    [FLINK-38730][build] Update jdk version of nightly to 17.
---
 .github/workflows/flink_cdc_base.yml               |   2 +-
 .github/workflows/flink_cdc_ci.yml                 |  19 ++--
 .github/workflows/flink_cdc_ci_nightly.yml         |  29 ++++--
 .../flink-cdc-source-e2e-tests/pom.xml             |   2 +-
 pom.xml                                            | 104 +++++++++++++++++++--
 5 files changed, 122 insertions(+), 34 deletions(-)

diff --git a/.github/workflows/flink_cdc_base.yml 
b/.github/workflows/flink_cdc_base.yml
index e27a1a192..f2d2988b4 100644
--- a/.github/workflows/flink_cdc_base.yml
+++ b/.github/workflows/flink_cdc_base.yml
@@ -22,7 +22,7 @@ on:
         description: "Jdk versions to test against."
         required: false
         type: string
-        default: "['8']"
+        default: "['11']"
       flink-versions:
         description: "Flink versions to test against."
         required: false
diff --git a/.github/workflows/flink_cdc_ci.yml 
b/.github/workflows/flink_cdc_ci.yml
index d1090025b..e44688dae 100644
--- a/.github/workflows/flink_cdc_ci.yml
+++ b/.github/workflows/flink_cdc_ci.yml
@@ -22,13 +22,6 @@ on:
     paths-ignore:
       - 'docs/**'
       - 'README.md'
-  pull_request:
-    branches:
-      - master
-      - release-*
-    paths-ignore:
-      - 'docs/**'
-      - 'README.md'
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.event_name }}-${{ 
github.event.number || github.run_id }}
@@ -50,7 +43,7 @@ jobs:
       - name: Set JDK
         uses: actions/setup-java@v4
         with:
-          java-version: '8'
+          java-version: '11'
           distribution: 'temurin'
           cache: 'maven'
       - name: Compiling jar packages
@@ -61,19 +54,19 @@ jobs:
     name: Common Unit Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[8]"
+      java-versions: "[11]"
       modules: "['core']"
   pipeline-ut:
     name: Pipeline Unit Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[8]"
+      java-versions: "[11]"
       modules: "['mysql-pipeline', 'postgres-pipeline', 'oceanbase-pipeline', 
'doris', 'elasticsearch', 'iceberg', 'kafka', 'maxcompute', 'paimon', 
'starrocks', 'fluss']"
   source-ut:
     name: Source Unit Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[8]"
+      java-versions: "[11]"
       modules: "['mysql-source', 'postgres-source', 'oracle', 'mongodb7', 
'mongodb8', 'sqlserver', 'tidb', 'oceanbase-source', 'db2', 'vitess']"
   pipeline_e2e:
     strategy:
@@ -83,7 +76,7 @@ jobs:
     name: Pipeline E2E Tests (${{ matrix.parallelism }}-Parallelism)
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[8]"
+      java-versions: "[11]"
       flink-versions: "['1.19.3', '1.20.3']"
       modules: "['pipeline_e2e']"
       parallelism: ${{ matrix.parallelism }}
@@ -91,6 +84,6 @@ jobs:
     name: Source E2E Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[8]"
+      java-versions: "[11]"
       flink-versions: "['1.19.3', '1.20.3']"
       modules: "['source_e2e']"
diff --git a/.github/workflows/flink_cdc_ci_nightly.yml 
b/.github/workflows/flink_cdc_ci_nightly.yml
index 33582185a..8119dfca7 100644
--- a/.github/workflows/flink_cdc_ci_nightly.yml
+++ b/.github/workflows/flink_cdc_ci_nightly.yml
@@ -15,9 +15,20 @@
 
 name: Flink CDC CI Nightly
 on:
-  schedule:
-    - cron: '43 0 * * *' # Run daily, but not at 00:00 UTC to avoid job 
failure due to network throttle
-  workflow_dispatch:
+  push:
+    branches:
+      - master
+      - release-*
+    paths-ignore:
+      - 'docs/**'
+      - 'README.md'
+  pull_request:
+    branches:
+      - master
+      - release-*
+    paths-ignore:
+      - 'docs/**'
+      - 'README.md'
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.event_name }}-${{ 
github.event.number || github.run_id }}
@@ -40,7 +51,7 @@ jobs:
       - name: Set JDK
         uses: actions/setup-java@v4
         with:
-          java-version: '11'
+          java-version: '17'
           distribution: 'temurin'
           cache: 'maven'
       - name: Compiling jar packages
@@ -52,21 +63,21 @@ jobs:
     name: Common Unit Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[11]"
+      java-versions: "[17]"
       modules: "['core']"
   pipeline-ut:
     if: github.repository == 'apache/flink-cdc'
     name: Pipeline Unit Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[11]"
+      java-versions: "[17]"
       modules: "['mysql-pipeline', 'postgres-pipeline', 'oceanbase-pipeline', 
'doris', 'elasticsearch', 'iceberg', 'kafka', 'maxcompute', 'paimon', 
'starrocks', 'fluss']"
   source-ut:
     if: github.repository == 'apache/flink-cdc'
     name: Source Unit Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[11]"
+      java-versions: "[17]"
       modules: "['mysql-source', 'postgres-source', 'oracle', 'mongodb7', 
'mongodb8', 'sqlserver', 'tidb', 'oceanbase-source', 'db2', 'vitess']"
   pipeline_e2e:
     if: github.repository == 'apache/flink-cdc'
@@ -77,7 +88,7 @@ jobs:
     name: Pipeline E2E Tests (${{ matrix.parallelism }}-Parallelism)
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[11]"
+      java-versions: "[17]"
       flink-versions: "['1.19.3', '1.20.3']"
       modules: "['pipeline_e2e']"
       parallelism: ${{ matrix.parallelism }}
@@ -86,6 +97,6 @@ jobs:
     name: Source E2E Tests
     uses: ./.github/workflows/flink_cdc_base.yml
     with:
-      java-versions: "[11]"
+      java-versions: "[17]"
       flink-versions: "['1.19.3', '1.20.3']"
       modules: "['source_e2e']"
diff --git a/flink-cdc-e2e-tests/flink-cdc-source-e2e-tests/pom.xml 
b/flink-cdc-e2e-tests/flink-cdc-source-e2e-tests/pom.xml
index 57385cc12..4c75e53fe 100644
--- a/flink-cdc-e2e-tests/flink-cdc-source-e2e-tests/pom.xml
+++ b/flink-cdc-e2e-tests/flink-cdc-source-e2e-tests/pom.xml
@@ -212,7 +212,7 @@ limitations under the License.
                 <executions>
                     <execution>
                         <id>copy-jars</id>
-                        <phase>process-resources</phase>
+                        <phase>test</phase>
                         <goals>
                             <goal>copy</goal>
                         </goals>
diff --git a/pom.xml b/pom.xml
index 6a7d5eac3..6a1ad440c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@ limitations under the License.
         <version.awaitility>4.2.0</version.awaitility>
         <slf4j.version>1.7.36</slf4j.version>
         <log4j.version>2.17.1</log4j.version>
-        <spotless.version>2.4.2</spotless.version>
+        <spotless.version>2.43.0</spotless.version>
         <commons-lang3.version>3.12.0</commons-lang3.version>
         <json-path.version>2.7.0</json-path.version>
         <jackson.version>2.13.2</jackson.version>
@@ -98,6 +98,14 @@ limitations under the License.
         <iceberg.version>1.6.1</iceberg.version>
         <hive.version>2.3.9</hive.version>
         <hadoop.version>3.3.4</hadoop.version>
+        <java.version>11</java.version>
+        <source.java.version>11</source.java.version>
+        <target.java.version>11</target.java.version>
+        <!-- Overwrite default values from parent pom.
+             IntelliJ IDEA is (sometimes?) using those values to choose target 
language level
+             and thus is changing back to java 1.6 on each maven re-import -->
+        <maven.compiler.source>${source.java.version}</maven.compiler.source>
+        <maven.compiler.target>${target.java.version}</maven.compiler.target>
     </properties>
 
     <dependencyManagement>
@@ -465,7 +473,7 @@ limitations under the License.
                 <configuration>
                     <java>
                         <googleJavaFormat>
-                            <version>1.7</version>
+                            <version>1.10.0</version>
                             <style>AOSP</style>
                         </googleJavaFormat>
 
@@ -561,6 +569,14 @@ limitations under the License.
                          does not understand some time zone which used in 
Ubuntu OS -->
                     <argLine>-Xms256m -Xmx2048m 
-Dmvn.forkNumber=${surefire.forkNumber}
                         -XX:+UseG1GC -Doracle.jdbc.timezoneAsRegion=false
+                        --add-opens=java.base/java.lang=ALL-UNNAMED
+                        --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
+                        --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
+                        --add-opens=java.base/java.util=ALL-UNNAMED
+                        --add-opens=java.sql/java.sql=ALL-UNNAMED
+                        --add-opens=java.base/java.nio=ALL-UNNAMED
+                        
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
+                        --add-exports=java.base/sun.nio.ch=ALL-UNNAMED
                     </argLine>
                 </configuration>
             </plugin>
@@ -674,8 +690,8 @@ limitations under the License.
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>${maven.compiler.source}</source>
-                    <target>${maven.compiler.target}</target>
+                    <source>${source.java.version}</source>
+                    <target>${target.java.version}</target>
                 </configuration>
             </plugin>
 
@@ -688,6 +704,29 @@ limitations under the License.
                     <generateBackupPoms>false</generateBackupPoms>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>enforce-maven</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireMavenVersion>
+                                    <!-- enforce at least mvn version 3.1.1 
(see FLINK-12447) -->
+                                    <version>[3.1.1,)</version>
+                                </requireMavenVersion>
+                                <requireJavaVersion>
+                                    <version>${source.java.version}</version>
+                                </requireJavaVersion>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
@@ -774,26 +813,71 @@ limitations under the License.
             </build>
         </profile>
         <profile>
-            <id>java-8-target</id>
+            <id>java-11-target</id>
             <activation>
-                <jdk>[1.8,11)</jdk>
+                <jdk>[11,17)</jdk>
             </activation>
             <properties>
-                <java.version>1.8</java.version>
+                <java.version>11</java.version>
                 <maven.compiler.source>${java.version}</maven.compiler.source>
                 <maven.compiler.target>${java.version}</maven.compiler.target>
             </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <source>11</source>
+                            <target>11</target>
+                            <compilerArgs combine.children="append">
+                                
<arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
         </profile>
         <profile>
-            <id>java-11-target</id>
+            <id>java-17-target</id>
             <activation>
-                <jdk>[11,)</jdk>
+                <jdk>[17,)</jdk>
             </activation>
             <properties>
-                <java.version>11</java.version>
+                <java.version>17</java.version>
                 <maven.compiler.source>${java.version}</maven.compiler.source>
                 <maven.compiler.target>${java.version}</maven.compiler.target>
             </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <source>17</source>
+                            <target>17</target>
+                            <compilerArgs combine.children="append">
+                                
<arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg>
+                                
<arg>--add-exports=java.base/java.util=ALL-UNNAMED</arg>
+                                <arg>--add-opens</arg>
+                                <arg>java.base/java.lang=ALL-UNNAMED</arg>
+                                <arg>--add-opens</arg>
+                                
<arg>java.base/java.lang.reflect=ALL-UNNAMED</arg>
+                                <arg>--add-opens</arg>
+                                
<arg>java.base/java.util.concurrent=ALL-UNNAMED</arg>
+                                <arg>--add-opens</arg>
+                                <arg>java.base/java.util=ALL-UNNAMED</arg>
+                            </compilerArgs>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
         </profile>
     </profiles>
 </project>

Reply via email to