peiyu created FLINK-41642:
-----------------------------

             Summary: Consolidate Flink generation switching into the root pom
                 Key: FLINK-41642
                 URL: https://issues.apache.org/jira/browse/FLINK-41642
             Project: Flink
          Issue Type: Sub-task
          Components: Flink CDC
    Affects Versions: cdc-3.7.0
            Reporter: peiyu


h2. Purpose

Make the root pom the single generation switch point. Today the 1.20-vs-2.2 
switching is scattered across the local flink1/flink2 profiles of 7 modules 
(~350 lines of duplication); after this sub-task a module carries zero local 
generation profiles.

h2. Changes

* The root pom gains {{flink1}} (activeByDefault) / {{flink2}} profiles 
centralizing {{flink.version}}, {{flink.compat.artifactId}} and the external 
connector versions (kafka / elasticsearch / paimon / iceberg / fluss).
* The local profiles in cli, common, composer, runtime, dist, connect and 
source-connectors are deleted; the modules keep an unconditional dependency on 
${{{flink.compat.artifactId}}} (the root pom itself must not declare it - the 
compat modules are part of the reactor and would inherit a dependency on 
themselves).
* Effective values unchanged by construction: every moved property is compared 
before/after with {{mvn help:evaluate}} on both profiles.

h2. Preserved as-is (the guava mechanism)

* The root {{flink2}} profile keeps the {{copy-flink2-guava}} execution and the 
surefire {{additionalClasspathElement}} + {{flink.profile=flink2}} system 
property.
* connect keeps {{copy-flink2-extra-libs}} and the {{*:*}}-exclusion 
neutralization declarations; runtime keeps {{flink2-exclude-flink1}}.
* dist keeps its module-local, generation-specific guava dependency - 
{{shaded.guava.version}} must never be switched globally, or the 89 {{guava31}} 
imports stop compiling.

h2. Verification

Dual-generation full builds; {{-Pflink2}} unit tests must still run (proves the 
guava33 test classpath survived); fat jars byte-identical (pure property move).

h2. Dependencies

After the rename sub-task (module names); otherwise independent.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to