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-13748][S3][build] Fix jaxb relocation for S3. #9695
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,10 +270,6 @@ under the License. | |
<pattern>io.airlift</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.io.airlift</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>javax.xml.bind</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.javax.xml.bind</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>org.HdrHistogram</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.org.HdrHistogram</shadedPattern> | ||
|
@@ -342,6 +338,130 @@ under the License. | |
<version>2.3.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>ban-openjdk.jol</id> | ||
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<rules> | ||
<bannedDependencies> | ||
<excludes> | ||
<!-- Incompatible license --> | ||
<exclude>org.openjdk.jol:*</exclude> | ||
</excludes> | ||
</bannedDependencies> | ||
</rules> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>shade-flink</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<shadeTestJar>false</shadeTestJar> | ||
<artifactSet> | ||
<includes> | ||
<include>*:*</include> | ||
</includes> | ||
</artifactSet> | ||
<relocations> | ||
<!-- relocate the references to Hadoop to match the pre-shaded hadoop artifact --> | ||
<relocation> | ||
<pattern>org.apache.hadoop</pattern> | ||
<shadedPattern>org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop</shadedPattern> | ||
</relocation> | ||
<!-- relocate the AWS dependencies --> | ||
<relocation> | ||
<pattern>com.amazon</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3base.shaded.com.amazon</shadedPattern> | ||
</relocation> | ||
<!-- relocate S3 presto and dependencies --> | ||
<relocation> | ||
<pattern>com.facebook</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.com.facebook</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>com.fasterxml</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.com.fasterxml</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>io.airlift</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.io.airlift</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>javax.xml.bind</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.javax.xml.bind</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>org.HdrHistogram</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.org.HdrHistogram</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>org.joda</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.org.joda</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>org.weakref</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.org.weakref</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>org.openjdk</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.org.openjdk</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>com.google</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.shaded.com.google</shadedPattern> | ||
</relocation> | ||
|
||
<!-- shade Flink's Hadoop FS utility classes --> | ||
<relocation> | ||
<pattern>org.apache.flink.runtime.util</pattern> | ||
<shadedPattern>org.apache.flink.fs.s3presto.common</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
<filters> | ||
<filter> | ||
<artifact>*</artifact> | ||
<excludes> | ||
<exclude>META-INF/maven/org.weakref/**</exclude> | ||
<exclude>META-INF/maven/org.hdrhistogram/**</exclude> | ||
<exclude>META-INF/maven/joda-time/**</exclude> | ||
<exclude>META-INF/maven/io.airlift/**</exclude> | ||
<exclude>META-INF/maven/com*/**</exclude> | ||
<exclude>META-INF/maven/org.apache.flink/force-shading/**</exclude> | ||
<exclude>META-INF/LICENSE.txt</exclude> | ||
</excludes> | ||
</filter> | ||
<filter> | ||
<artifact>com.facebook.presto.hadoop:hadoop-apache2</artifact> | ||
<includes> | ||
<include>com/facebook/presto/hadoop/**</include> | ||
</includes> | ||
</filter> | ||
</filters> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. I think maintaining this shading logic can be quite a pain in the ass. |
||
</profile> | ||
</profiles> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding this rather complicated shade snippet, why don't we always add the
jaxb-api
dependency via