New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-8193][quickstart] Cleanup quickstart poms #5118
Conversation
The comment about "adding to the exclusions" under Overall, I like the simplification. |
I think that the change of
|
Is there a way to fail the build if users do not use the |
|
I'll add flink-clients again with a comment. |
As for failing the build, I don't like that option, even if I find a way to do it. We do not know how such a kill-switch would interact with various IDEs and tools. What we could do however is print a warning if mvn package/install is invoked without specifying the build-jar profile. |
I like it this way, but what do you think, @StephanEwen? Is that a strong preference for "fail the build"? |
Note that the current approach also prints a warning if |
Is it possible to print that only in the |
that's what we're already doing (well technically in the Thing is that the |
I am unsure here. The warning is nice, but without some exclusions from the shading phase, we will have many users wich build gigantic jars (happens to me as well sometimes). Duplicating dependencies into the user jar is more dangerous now than it used to be, given that we have the inverted classloading activated as a default. We saw such issues with Avro, and probably have similar issues with Kryo and custom serializers as well, if they end up both in app classpath and in the user jar. I know its harder to maintain, but in this case I think that immediate user experience trumps maintenance effort, so I would vote to add the exclusions back. The exclusions set should be much smaller now that we don't have Hadoop as a dependency here anymore. Having at least the flink projects (and flink-shaded projects) as exclusions, as well as scala / akka / kryo should really help. We can use wildcard exclusions to make it more future safe, like replacing scala version with |
Can't we do what I suggested earlier: don't build a fat jar if you don't specify the For programs that don't have deps besides the basic Flink deps this still works and if people add fancy dependencies they must know that they must somehow include them in their jar and then they discover |
That should work. |
+1 for the latest suggestion |
…file" This reverts commit 88a30fd.
94fd098
to
f915506
Compare
Updated the PR. |
Looks good. Could you double check what gets packaged into the fat jar? In the previous version, the |
After adding kafka09/cassandra, I've added exclusions for these dependencies to the shade-plugin configuration, as well as for jsr305 just to be safe. |
+1 |
merging. |
What is the purpose of the change
This PR addresses 2 problems in the quick start poms:
This PR fixes the missing/unused dependencies, and removes the manual exclusion so there is now only one correct way of building the jar, which is using the
build-jar
profile.Verifying this change
This change was verified locally. I installed the archetypes locally and created new projects from them.
For verification I executed the programs in the IDE and packaged the jar with the
build-jar
profile and checked whether that they don't contain any dependencies.Documentation