[
https://issues.apache.org/jira/browse/FLINK-5989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952094#comment-15952094
]
Wenlong Lyu commented on FLINK-5989:
------------------------------------
hi, [~rmetzger], have you ever try add a module like flink-shade-akka-remote to
solve the problem
{code}
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.flink</groupId>
<artifactId>flink-parent</artifactId>
<version>1.3-blink-1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>flink-shaded-akka-remote</artifactId>
<name>flink-shaded-akka-remote</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.data-artisans</groupId>
<artifactId>flakka-remote_${scala.binary.version}</artifactId>
<version>${akka.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Relocate the Hadoop's Guava dependency into a
different namespace and
put Hadoop into a fat-jar.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<!--Disable shade-flink
execution to avoid duplicate relocation of
dependencies-->
<id>shade-flink</id>
<phase>none</phase>
</execution>
<execution>
<id>shade-akka</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<transformers>
<!-- 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"/>
</transformers>
<artifactSet>
<includes>
<include>com.google.protobuf:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>org.apache.flink.akka.shaded.com.google</shadedPattern>
<excludes>
<exclude>com.google.inject.**</exclude>
</excludes>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
{/code}
> Protobuf in akka needs to be shaded
> -----------------------------------
>
> Key: FLINK-5989
> URL: https://issues.apache.org/jira/browse/FLINK-5989
> Project: Flink
> Issue Type: Improvement
> Components: Build System
> Reporter: Wenlong Lyu
>
> Currently akka introduces dependency on protobuf, which is a common jar used
> in many systems, I think we need to use a shaded akka like what we do in
> dependency on hadoop to avoid version conflicts with user code.
> {code}
> [INFO] +- com.data-artisans:flakka-actor_2.10:jar:2.3-custom:compile
> [INFO] | \- com.typesafe:config:jar:1.2.1:compile
> [INFO] +- com.data-artisans:flakka-remote_2.10:jar:2.3-custom:compile
> [INFO] | +- io.netty:netty:jar:3.8.0.Final:compile
> [INFO] | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
> [INFO] | \- org.uncommons.maths:uncommons-maths:jar:1.2.2a:compile
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)