-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-22555][build][python] Exclude leftover jboss files #15827
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
Changes from all commits
ee87f7c
c161969
f90acde
2632d0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,6 +247,10 @@ under the License. | |
| <goal>test-jar-no-fork</goal> | ||
| </goals> | ||
| <configuration> | ||
| <archive> | ||
| <!-- Globally exclude maven metadata, because it may accidentally bundle files we don't intend to --> | ||
| <addMavenDescriptor>false</addMavenDescriptor> | ||
|
Contributor
Author
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. ideally we move this into the pluginManagement section in the root pom, but I already spent too much time on this ticket (and actually pin the plugin version...) |
||
| </archive> | ||
| <includes> | ||
| <include>**/KafkaTestEnvironmentImpl*</include> | ||
| <include>META-INF/LICENSE</include> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -675,11 +675,12 @@ under the License. | |
| <artifactId>maven-shade-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>shade-dist</id> | ||
|
Contributor
Author
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. This is essentially just a safeguard against accidentally inheriting something from somewhere. |
||
| <phase>package</phase> | ||
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.self="override"> | ||
|
Contributor
Author
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. this removal is safe because it is a distinct execution, and hence never had any effect. |
||
| <configuration> | ||
| <createDependencyReducedPom>false</createDependencyReducedPom> | ||
| <shadedArtifactAttached>false</shadedArtifactAttached> | ||
| <finalName>${project.artifactId}-${project.version}</finalName> | ||
|
|
@@ -688,11 +689,6 @@ under the License. | |
| <filter> | ||
| <artifact>*</artifact> | ||
| <excludes> | ||
| <exclude>log4j.properties</exclude> | ||
| <exclude>log4j-test.properties</exclude> | ||
| <exclude>META-INF/*.SF</exclude> | ||
| <exclude>META-INF/*.DSA</exclude> | ||
| <exclude>META-INF/*.RSA</exclude> | ||
| <exclude>org/apache/flink/runtime/util/bash/BashJavaUtils.class</exclude> | ||
| </excludes> | ||
| </filter> | ||
|
|
@@ -709,12 +705,6 @@ under the License. | |
| <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | ||
| <resource>reference.conf</resource> | ||
| </transformer> | ||
| <!-- The service transformer is needed to merge META-INF/services files --> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> | ||
| <projectName>Apache Flink</projectName> | ||
| <encoding>UTF-8</encoding> | ||
| </transformer> | ||
| </transformers> | ||
| </configuration> | ||
| </execution> | ||
|
|
@@ -734,22 +724,11 @@ under the License. | |
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.self="override"> | ||
|
Contributor
Author
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. this removal is safe because it is a distinct execution, and hence never had any effect. |
||
| <configuration> | ||
| <createDependencyReducedPom>false</createDependencyReducedPom> | ||
| <shadedArtifactAttached>false</shadedArtifactAttached> | ||
| <finalName>bash-java-utils</finalName> | ||
| <filters> | ||
| <!-- Globally exclude log4j.properties from our JAR files. --> | ||
| <filter> | ||
| <artifact>*</artifact> | ||
| <excludes> | ||
| <exclude>log4j.properties</exclude> | ||
| <exclude>log4j-test.properties</exclude> | ||
| <exclude>META-INF/*.SF</exclude> | ||
| <exclude>META-INF/*.DSA</exclude> | ||
| <exclude>META-INF/*.RSA</exclude> | ||
| </excludes> | ||
| </filter> | ||
| <!-- Include only the BashJavaUtils, other required classes should come from the flink-dist--> | ||
| <filter> | ||
| <artifact>org.apache.flink:*</artifact> | ||
|
|
@@ -770,13 +749,6 @@ under the License. | |
| <resource>log4j2.properties</resource> | ||
| <file>src/main/resources/log4j-bash-utils.properties</file> | ||
| </transformer> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | ||
| <resource>reference.conf</resource> | ||
| </transformer> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> | ||
| <projectName>Apache Flink</projectName> | ||
| <encoding>UTF-8</encoding> | ||
| </transformer> | ||
| </transformers> | ||
| </configuration> | ||
| </execution> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -129,7 +129,7 @@ under the License. | |
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.children="append"> | ||
|
Contributor
Author
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. afaik this doesn't make sense and just results in any parent configurations being ignored. Similar to cassandra it is unnecessary because we aren't doing anything special, and we get rid of an odd special case. |
||
| <configuration> | ||
| <artifactSet> | ||
| <includes combine.children="append"> | ||
| <include>io.fabric8:kubernetes-client</include> | ||
|
|
@@ -156,7 +156,6 @@ under the License. | |
| <artifact>*:*</artifact> | ||
| <excludes> | ||
| <exclude>*.aut</exclude> | ||
| <exclude>META-INF/maven/**</exclude> | ||
| <exclude>META-INF/services/*com.fasterxml*</exclude> | ||
| <exclude>META-INF/proguard/**</exclude> | ||
| <exclude>OSGI-INF/**</exclude> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1366,6 +1366,8 @@ under the License. | |
| <version>2.4</version><!--$NO-MVN-MAN-VER$--> | ||
| <configuration> | ||
| <archive> | ||
| <!-- Globally exclude maven metadata, because it may accidentally bundle files we don't intend to --> | ||
| <addMavenDescriptor>false</addMavenDescriptor> | ||
| <manifest> | ||
| <addDefaultImplementationEntries>true</addDefaultImplementationEntries> | ||
| <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> | ||
|
|
@@ -1726,6 +1728,50 @@ under the License. | |
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-shade-plugin</artifactId> | ||
| <configuration> | ||
| <!-- This section contains the core configuration that is applied to every jar that we create.--> | ||
| <filters combine.children="append"> | ||
| <filter> | ||
| <artifact>*</artifact> | ||
| <excludes> | ||
| <!-- Globally exclude log4j.properties from our JAR files. --> | ||
| <exclude>log4j.properties</exclude> | ||
| <exclude>log4j2.properties</exclude> | ||
| <exclude>log4j-test.properties</exclude> | ||
| <exclude>log4j2-test.properties</exclude> | ||
| <!-- Do not copy the signatures in the META-INF folder. | ||
| Otherwise, this might cause SecurityExceptions when using the JAR. --> | ||
| <exclude>META-INF/*.SF</exclude> | ||
| <exclude>META-INF/*.DSA</exclude> | ||
| <exclude>META-INF/*.RSA</exclude> | ||
| <!-- META-INF/maven can contain 2 things: | ||
| - For archetypes, it contains an archetype-metadata.xml. | ||
| - For other jars, it contains the pom for all dependencies under the respective <groupId>/<artifactId>/ directory. | ||
|
|
||
| We want to exclude the poms because they may be under an incompatible license, | ||
| however the archetype metadata is required and we need to keep that around. | ||
|
|
||
| This pattern excludes directories under META-INF/maven. | ||
| ('?*/**' does not work because '**' also matches zero directories; | ||
| everything that matches '?*' also matches '?*/**') | ||
|
|
||
| The initial '**' allows the pattern to also work for multi-release jars that may contain such entries under | ||
| 'META-INF/versions/11/META-INF/maven/'. | ||
| --> | ||
| <exclude>**/META-INF/maven/?*/?*/**</exclude> | ||
|
Contributor
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. Would it work to explicitly add the
Contributor
Author
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. I had the same idea, but don't think it would work because exclusions are used to narrow down inclusions.
Contributor
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. Ah ok. Then let's keep the current solution. |
||
| </excludes> | ||
| </filter> | ||
| </filters> | ||
| <transformers combine.children="append"> | ||
| <!-- The service transformer is needed to merge META-INF/services files --> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
| <!-- The ApacheNoticeResourceTransformer collects and aggregates NOTICE files --> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> | ||
| <projectName>Apache Flink</projectName> | ||
| <encoding>UTF-8</encoding> | ||
| </transformer> | ||
| </transformers> | ||
| </configuration> | ||
| <executions> | ||
| <execution> | ||
| <id>shade-flink</id> | ||
|
|
@@ -1740,16 +1786,6 @@ under the License. | |
| <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation> | ||
| <!-- Filters MUST be appended; merging filters does not work properly, see MSHADE-305 --> | ||
| <filters combine.children="append"> | ||
| <!-- Globally exclude log4j.properties from our JAR files. --> | ||
| <filter> | ||
| <artifact>*</artifact> | ||
| <excludes> | ||
| <exclude>log4j.properties</exclude> | ||
| <exclude>log4j2.properties</exclude> | ||
| <exclude>log4j-test.properties</exclude> | ||
| <exclude>log4j2-test.properties</exclude> | ||
| </excludes> | ||
| </filter> | ||
| <!-- drop entries into META-INF and NOTICE files for the dummy artifact --> | ||
| <filter> | ||
| <artifact>org.apache.flink:force-shading</artifact> | ||
|
|
@@ -1776,15 +1812,6 @@ under the License. | |
| <include>org.apache.flink:force-shading</include> | ||
| </includes> | ||
| </artifactSet> | ||
| <transformers combine.children="append"> | ||
| <!-- The service transformer is needed to merge META-INF/services files --> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
| <!-- The ApacheNoticeResourceTransformer collects and aggregates NOTICE files --> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> | ||
| <projectName>Apache Flink</projectName> | ||
| <encoding>UTF-8</encoding> | ||
| </transformer> | ||
| </transformers> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
|
|
||
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.
this removal is safe because it the override was plain unnecessary, and we get rid of an odd special case.