title: java.lang.ClassCastException: Netty fail on jar execution on Flink
body: <p>I have a flink jar that sink a datastream of serializable datatype on elastic and cassandra with a beahaviour that differ from stand-alone context.
  I have read about netty conflict with Flink process and I excluded it from the pom file but it follow to be included in the package<br>
  Any suggestions?</p>
  
  <p>This is the exception:</p>
  
  <pre><code>java.lang.ClassCastException: io.netty.channel.epoll.EpollEventLoopGroup cannot be cast to io.netty.channel.EventLoopGroup
      at com.datastax.driver.core.NettyUtil.newEventLoopGroupInstance(NettyUtil.java:134)
      at com.datastax.driver.core.NettyOptions.eventLoopGroup(NettyOptions.java:99)
      at com.datastax.driver.core.Connection$Factory.&lt;init&gt;(Connection.java:774)
      at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1446)
      at com.datastax.driver.core.Cluster.init(Cluster.java:159)
      at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:330)
      at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:305)
      at com.datastax.driver.core.Cluster.connect(Cluster.java:247)
      at it.almaviva.wtf.mms.integratemobilitystatusevent.repository.cassandra.ScheduledEventRepositoryImpl.findProgrammed(ScheduledEventRepositoryImpl.java:51)
      at it.almaviva.wtf.mms.integratemobilitystatusevent.transformation.ObservedEventDelayProcessFunction.loadScheduledEvents(ObservedEventDelayProcessFunction.java:368)
      at it.almaviva.wtf.mms.integratemobilitystatusevent.transformation.ObservedEventDelayProcessFunction.processElement(ObservedEventDelayProcessFunction.java:64)
      at it.almaviva.wtf.mms.integratemobilitystatusevent.transformation.ObservedEventDelayProcessFunction.processElement(ObservedEventDelayProcessFunction.java:1)
      at org.apache.flink.streaming.api.operators.KeyedProcessOperator.processElement(KeyedProcessOperator.java:94)
      at org.apache.flink.streaming.runtime.io.StreamInputProcessor.processInput(StreamInputProcessor.java:207)
      at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask.run(OneInputStreamTask.java:69)
      at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:264)
      at org.apache.flink.runtime.taskmanager.Task.run(Task.java:718)
      at java.lang.Thread.run(Thread.java:748)
      Suppressed: java.lang.NullPointerException
          at com.datastax.driver.core.Cluster$Manager.close(Cluster.java:1676)
          at com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:1354)
          at com.datastax.driver.core.Cluster.closeAsync(Cluster.java:566)
          at com.datastax.driver.core.Cluster.close(Cluster.java:578)
          at it.almaviva.wtf.mms.integratemobilitystatusevent.repository.cassandra.ScheduledEventRepositoryImpl.findProgrammed(ScheduledEventRepositoryImpl.java:68)
  </code></pre>
  
  <p>this is the pom file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;it.almaviva.wtf.mms&lt;/groupId&gt;
      &lt;artifactId&gt;mms-integretedmobilitystatusevent-flink-process&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;name&gt;Passing Event Process&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;flink.version&gt;1.4.0&lt;/flink.version&gt;
          &lt;slf4j.version&gt;1.7.7&lt;/slf4j.version&gt;
          &lt;log4j.version&gt;1.2.17&lt;/log4j.version&gt;
          &lt;scala.binary.version&gt;2.11&lt;/scala.binary.version&gt;
          &lt;junit.version&gt;4.12&lt;/junit.version&gt;
          &lt;cassandra.version&gt;3.2.0&lt;/cassandra.version&gt;
          &lt;flink.connector.elastic.version&gt;1.3.1&lt;/flink.connector.elastic.version&gt;
          &lt;thyco.compiler.version&gt;0.21.0&lt;/thyco.compiler.version&gt;
          &lt;jackson.version&gt;2.9.4&lt;/jackson.version&gt;
  
          &lt;cassandra.unit.version&gt;3.3.0.2&lt;/cassandra.unit.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;apache.snapshots&lt;/id&gt;
              &lt;name&gt;Apache Development Snapshot Repository&lt;/name&gt;
              &lt;url&gt;https://repository.apache.org/content/repositories/snapshots/&lt;/url&gt;
              &lt;releases&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/releases&gt;
              &lt;snapshots&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;!-- Execute "mvn clean package -Pbuild-jar" to build a jar file out of
                this project! How to use the Flink Quickstart pom: a) Adding new dependencies:
                You can add dependencies to the list below. Please check if the maven-shade-plugin
                below is filtering out your dependency and remove the exclude from there.
                b) Build a jar for running on the cluster: There are two options for creating
                a jar from this project b.1) "mvn clean package" -&gt; this will create a fat
                jar which contains all dependencies necessary for running the jar created
                by this pom in a cluster. The "maven-shade-plugin" excludes everything that
                is provided on a running Flink cluster. b.2) "mvn clean package -Pbuild-jar"
                -&gt; This will also create a fat-jar, but with much nicer dependency exclusion
                handling. This approach is preferred and leads to much cleaner jar files. --&gt;
  
      &lt;dependencies&gt;
          &lt;!-- Apache Flink dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-core&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-java&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- This dependency is required to actually execute jobs. It is currently pulled in by
  flink-streaming-java, but we explicitly depend on it to safeguard against future changes. --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-clients_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-streaming-java_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-connector-kafka-0.10_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- explicitly add a standard loggin framework, as Flink does not have
                        a hard dependency on one specific framework by default --&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
              &lt;version&gt;1.2.3&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-core&lt;/artifactId&gt;
              &lt;version&gt;1.2.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;${log4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.carrotsearch&lt;/groupId&gt;
              &lt;artifactId&gt;hppc&lt;/artifactId&gt;
              &lt;version&gt;0.3.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- TEST PURPOSE --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;${junit.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.cassandraunit&lt;/groupId&gt;
              &lt;artifactId&gt;cassandra-unit-shaded&lt;/artifactId&gt;
              &lt;version&gt;3.3.0.2&lt;/version&gt;
          &lt;/dependency&gt;
  
  
  
          &lt;!-- DATASTAX --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
              &lt;artifactId&gt;cassandra-driver-extras&lt;/artifactId&gt;
              &lt;version&gt;${cassandra.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;io.netty&lt;/groupId&gt;
                      &lt;artifactId&gt;*&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
              &lt;artifactId&gt;cassandra-driver-mapping&lt;/artifactId&gt;
              &lt;version&gt;${cassandra.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;io.netty&lt;/groupId&gt;
                      &lt;artifactId&gt;*&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
  
           &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-connector-elasticsearch5_2.10&lt;/artifactId&gt;
              &lt;version&gt;${flink.connector.elastic.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-scala_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-streaming-scala_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-cep_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-statebackend-rocksdb_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-connector-cassandra_${scala.binary.version}&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;${jackson.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;!-- Profile for packaging correct JAR files --&gt;
              &lt;id&gt;build-jar&lt;/id&gt;
  
              &lt;activation&gt;
                  &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
              &lt;/activation&gt;
  
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
                      &lt;artifactId&gt;flink-core&lt;/artifactId&gt;
                      &lt;version&gt;${flink.version}&lt;/version&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
                      &lt;artifactId&gt;flink-java&lt;/artifactId&gt;
                      &lt;version&gt;${flink.version}&lt;/version&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
                      &lt;artifactId&gt;flink-clients_${scala.binary.version}&lt;/artifactId&gt;
                      &lt;version&gt;${flink.version}&lt;/version&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
                      &lt;artifactId&gt;flink-streaming-java_${scala.binary.version}&lt;/artifactId&gt;
                      &lt;version&gt;${flink.version}&lt;/version&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                      &lt;version&gt;${log4j.version}&lt;/version&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
                  &lt;!-- DTO --&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
                      &lt;version&gt;${jackson.version}&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;!-- APACHE CASSANDRA --&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
                      &lt;artifactId&gt;cassandra-driver-extras&lt;/artifactId&gt;
                      &lt;version&gt;${cassandra.version}&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
                      &lt;artifactId&gt;cassandra-driver-mapping&lt;/artifactId&gt;
                      &lt;version&gt;${cassandra.version}&lt;/version&gt;
                  &lt;/dependency&gt;
  
              &lt;/dependencies&gt;
  
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;!-- disable the exclusion rules --&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                          &lt;version&gt;2.4.1&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;phase&gt;package&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;shade&lt;/goal&gt;
                                  &lt;/goals&gt;
                                  &lt;configuration&gt;
                                      &lt;artifactSet&gt;
                                          &lt;excludes combine.self="override"/&gt;
                                      &lt;/artifactSet&gt;
                                  &lt;/configuration&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- We use the maven-shade plugin to create a fat jar that contains all
            dependencies except flink and it's transitive dependencies. The resulting
            fat-jar can be executed on a cluster. Change the value of Program-Class if
            your program entry point changes. --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.1.0&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;!-- Run shade goal on package phase --&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;artifactSet&gt;
                                  &lt;excludes&gt;
                                      &lt;!-- This list contains all dependencies of flink-dist Everything
                        else will be packaged into the fat-jar --&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-annotations&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-shaded-hadoop1_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-shaded-hadoop2&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-shaded-curator-recipes&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-core&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-java&lt;/exclude&gt;
                                      &lt;!--                                                                    &lt;exclude&gt;org.apache.flink:flink-scala_2.10&lt;/exclude&gt; --&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-runtime_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-optimizer_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-clients_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-avro_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-examples-batch_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-examples-streaming_2.10&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.flink:flink-streaming-java_2.10&lt;/exclude&gt;
  
                                      &lt;!-- Also exclude very big transitive dependencies of Flink WARNING:
                        You have to remove these excludes if your code relies on other versions of
                        these dependencies. --&gt;
                                      &lt;exclude&gt;org.scala-lang:scala-library&lt;/exclude&gt;
                                      &lt;exclude&gt;org.scala-lang:scala-compiler&lt;/exclude&gt;
                                      &lt;exclude&gt;org.scala-lang:scala-reflect&lt;/exclude&gt;
                                      &lt;exclude&gt;com.typesafe.akka:akka-actor_*&lt;/exclude&gt;
                                      &lt;exclude&gt;com.typesafe.akka:akka-remote_*&lt;/exclude&gt;
                                      &lt;exclude&gt;io.netty:netty-all&lt;/exclude&gt;
                                      &lt;exclude&gt;io.netty:netty&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-fileupload:commons-fileupload&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.avro:avro&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-collections:commons-collections&lt;/exclude&gt;
                                      &lt;exclude&gt;org.codehaus.jackson:jackson-core-asl&lt;/exclude&gt;
                                      &lt;exclude&gt;org.codehaus.jackson:jackson-mapper-asl&lt;/exclude&gt;
                                      &lt;exclude&gt;com.thoughtworks.paranamer:paranamer&lt;/exclude&gt;
                                      &lt;exclude&gt;org.xerial.snappy:snappy-java&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.commons:commons-compress&lt;/exclude&gt;
                                      &lt;exclude&gt;org.tukaani:xz&lt;/exclude&gt;
                                      &lt;exclude&gt;com.esotericsoftware.kryo:kryo&lt;/exclude&gt;
                                      &lt;exclude&gt;com.esotericsoftware.minlog:minlog&lt;/exclude&gt;
                                      &lt;exclude&gt;org.objenesis:objenesis&lt;/exclude&gt;
                                      &lt;exclude&gt;com.twitter:chill_*&lt;/exclude&gt;
                                      &lt;exclude&gt;com.twitter:chill-java&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-lang:commons-lang&lt;/exclude&gt;
                                      &lt;exclude&gt;junit:junit&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.commons:commons-lang3&lt;/exclude&gt;
                                      &lt;exclude&gt;log4j:log4j&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.commons:commons-math&lt;/exclude&gt;
                                      &lt;exclude&gt;org.apache.sling:org.apache.sling.commons.json&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-logging:commons-logging&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-codec:commons-codec&lt;/exclude&gt;
                                      &lt;exclude&gt;stax:stax-api&lt;/exclude&gt;
                                      &lt;exclude&gt;com.typesafe:config&lt;/exclude&gt;
                                      &lt;exclude&gt;org.uncommons.maths:uncommons-maths&lt;/exclude&gt;
                                      &lt;exclude&gt;com.github.scopt:scopt_*&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-io:commons-io&lt;/exclude&gt;
                                      &lt;exclude&gt;commons-cli:commons-cli&lt;/exclude&gt;
                                  &lt;/excludes&gt;
                              &lt;/artifactSet&gt;
                              &lt;filters&gt;
                                  &lt;filter&gt;
                                      &lt;artifact&gt;org.apache.flink:*&lt;/artifact&gt;
                                      &lt;excludes&gt;
                                          &lt;!-- exclude shaded google but include shaded curator --&gt;
                                          &lt;exclude&gt;org/apache/flink/shaded/com/**&lt;/exclude&gt;
                                          &lt;exclude&gt;web-docs/**&lt;/exclude&gt;
                                      &lt;/excludes&gt;
                                  &lt;/filter&gt;
                                  &lt;filter&gt;
                                      &lt;!-- Do not copy the signatures in the META-INF folder. Otherwise,
                        this might cause SecurityExceptions when using the JAR. --&gt;
                                      &lt;artifact&gt;*:*&lt;/artifact&gt;
                                      &lt;excludes&gt;
                                          &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                                          &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                                          &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                                      &lt;/excludes&gt;
                                  &lt;/filter&gt;
                              &lt;/filters&gt;
                              &lt;!-- If you want to use ./bin/flink run &lt;quickstart jar&gt; uncomment
                    the following lines. This will add a Main-Class entry to the manifest file --&gt;
                              &lt;transformers&gt;
                                  &lt;transformer
                                          implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                                      &lt;mainClass&gt;it.almaviva.wtf.mms.integratemobilitystatusevent.PassingEventProcess
                                      &lt;/mainClass&gt;
                                  &lt;/transformer&gt;
                              &lt;/transformers&gt;
                              &lt;createDependencyReducedPom&gt;false&lt;/createDependencyReducedPom&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                      &lt;compilerId&gt;jdt&lt;/compilerId&gt;
                  &lt;/configuration&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                          &lt;artifactId&gt;tycho-compiler-jdt&lt;/artifactId&gt;
                          &lt;version&gt;0.21.0&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.7.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;1.8&lt;/source&gt;
                          &lt;target&gt;1.8&lt;/target&gt;
                          &lt;compilerId&gt;jdt&lt;/compilerId&gt;
                      &lt;/configuration&gt;
                      &lt;dependencies&gt;
                          &lt;dependency&gt;
                              &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                              &lt;artifactId&gt;tycho-compiler-jdt&lt;/artifactId&gt;
                              &lt;version&gt;0.21.0&lt;/version&gt;
                          &lt;/dependency&gt;
                      &lt;/dependencies&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                      &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                      &lt;version&gt;1.0.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;lifecycleMappingMetadata&gt;
                              &lt;pluginExecutions&gt;
                                  &lt;pluginExecution&gt;
                                      &lt;pluginExecutionFilter&gt;
                                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                          &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                                          &lt;versionRange&gt;[2.4,)&lt;/versionRange&gt;
                                          &lt;goals&gt;
                                              &lt;goal&gt;single&lt;/goal&gt;
                                          &lt;/goals&gt;
                                      &lt;/pluginExecutionFilter&gt;
                                      &lt;action&gt;
                                          &lt;ignore/&gt;
                                      &lt;/action&gt;
                                  &lt;/pluginExecution&gt;
                                  &lt;pluginExecution&gt;
                                      &lt;pluginExecutionFilter&gt;
                                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                                          &lt;versionRange&gt;[3.1,)&lt;/versionRange&gt;
                                          &lt;goals&gt;
                                              &lt;goal&gt;testCompile&lt;/goal&gt;
                                              &lt;goal&gt;compile&lt;/goal&gt;
                                          &lt;/goals&gt;
                                      &lt;/pluginExecutionFilter&gt;
                                      &lt;action&gt;
                                          &lt;ignore/&gt;
                                      &lt;/action&gt;
                                  &lt;/pluginExecution&gt;
                              &lt;/pluginExecutions&gt;
                          &lt;/lifecycleMappingMetadata&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>