Skip to content

Commit

Permalink
[FLINK-7419][build][avro] Shade jackson dependency in flink-dist
Browse files Browse the repository at this point in the history
This closes apache#4981.
  • Loading branch information
zentol committed Nov 14, 2017
1 parent e164729 commit fe98cb7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 29 deletions.
6 changes: 6 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,12 @@ under the License.
<exclude>log4j:log4j</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.codehaus.jackson</pattern>
<shadedPattern>org.apache.flink.formats.avro.shaded.org.codehaus.jackson</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
Expand Down
29 changes: 0 additions & 29 deletions flink-formats/flink-avro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,35 +171,6 @@ under the License.
</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 combine.self="override">
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
<includes>
<include>org.codehaus.jackson:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.codehaus.jackson</pattern>
<shadedPattern>org.apache.flink.avro.shaded.org.codehaus.jackson</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
Expand Down
16 changes: 16 additions & 0 deletions tools/travis_mvn_watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,22 @@ check_shaded_artifacts() {
return 1
fi

CODEHAUS_JACKSON=`cat allClasses | grep '^org/codehaus/jackson' | wc -l`
if [ "$CODEHAUS_JACKSON" != "0" ]; then
echo "=============================================================================="
echo "Detected '$CODEHAUS_JACKSON' unshaded org.codehaus.jackson classes in fat jar"
echo "=============================================================================="
return 1
fi

FASTERXML_JACKSON=`cat allClasses | grep '^com/fasterxml/jackson' | wc -l`
if [ "$FASTERXML_JACKSON" != "0" ]; then
echo "=============================================================================="
echo "Detected '$FASTERXML_JACKSON' unshaded com.fasterxml.jackson classes in fat jar"
echo "=============================================================================="
return 1
fi

SNAPPY=`cat allClasses | grep '^org/xerial/snappy' | wc -l`
if [ "$SNAPPY" == "0" ]; then
echo "=============================================================================="
Expand Down

0 comments on commit fe98cb7

Please sign in to comment.