[ 
https://issues.apache.org/jira/browse/FLINK-28016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555043#comment-17555043
 ] 

Chesnay Schepler edited comment on FLINK-28016 at 6/16/22 12:06 PM:
--------------------------------------------------------------------

[~wangyang0918] One example are the dependencies bundled&relocated in 
flink-kubernetes. They will appear again in flink-dist without a relocation.

More generally, any time a module bundles dependencies, and other module will 
still see the original dependencies. This _may_ result in more stuff being 
bundled (e.g., flink-dist again bundles all dependencies from 
flink-kubernetes), more dependencies being on the classpath (e.g., during 
testing), or the version of dependencies being changed.

Note that you naturally only see this if both modules were build in the same 
run. If you just build flink-dist there's no problem (hence why this is the 
documented workaround).


was (Author: zentol):
[~wangyang0918] One example are the dependencies bundled&relocated in 
flink-kubernetes. They will appear again in flink-dist without a relocation.

More generally, any time a module bundles dependencies, and other module will 
still see the original dependencies. This _may_ result in more stuff being 
bundled, more dependencies being on the classpath (e.g., during testing), or 
the version of dependencies being changed.

Note that you naturally only see this if both modules were build in the same 
run. If you just build flink-dist there's no problem (hence why this is the 
documented workaround).

> Support Maven 3.3+
> ------------------
>
>                 Key: FLINK-28016
>                 URL: https://issues.apache.org/jira/browse/FLINK-28016
>             Project: Flink
>          Issue Type: Technical Debt
>          Components: Build System
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Major
>             Fix For: 1.16.0
>
>
> We are currently de-facto limited to Maven 3.2.5 because our packaging relies 
> on the shade-plugin modifying the dependency tree at runtime when bundling 
> dependencies, which is no longer possible on Maven 3.3+.
> Being locked in to such an old Maven version isn't a good state to be in, and 
> the contributor experience suffers as well.
> I've been looking into removing this limitation by explicitly marking every 
> dependency that we bundle as {{optional}} in the poms, which really means 
> {{non-transitive}}. This ensures that the everything being bundled by one 
> module is not visible to other modules. Some tooling to capture developer 
> mistakes were also written.
> Overall this is actually quite a nice change, as it makes things more 
> explicit and reduces inconsistencies (e.g., the dependency plugin results are 
> questionable if the shade-plugin didn't run!); and it already highlighted 
> several problems in Flink.
> This change will have no effect on users or the released poms, because the 
> dependency-reduced poms will be generated as before and remove all modified 
> dependencies.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to