Skip to content

Commit

Permalink
[FLINK-11289][examples] Rework examples to account for licensing
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Jan 16, 2019
1 parent b56197a commit 979ebd2
Show file tree
Hide file tree
Showing 10 changed files with 347 additions and 81 deletions.
63 changes: 59 additions & 4 deletions NOTICE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ Copyright 2014-2018 The Apache Software Foundation
This project bundles the following dependencies under the Apache Software License 2.0 (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- com.chuusai:shapeless_2.11:2.3.2
- com.google.guava:guava:14.0.1
- com.twitter:hbc-core:2.2.0
- com.twitter:joauth:6.0.2
- log4j:log4j:1.2.17
- net.sf.opencsv:opencsv:2.3
- org.apache.kafka:kafka-clients:jar:0.10.2.1
- org.scalanlp:breeze_2.11:0.13
- org.scalanlp:breeze-macros_2.11:0.13
- org.typelevel:macro-compat_2.11:1.1.1
Expand Down Expand Up @@ -5806,3 +5802,62 @@ This project bundles the following dependencies under the Apache Software Licens

- io.dropwizard.metrics:metrics-core:3.1.5
- io.dropwizard.metrics:metrics-graphite:3.1.5

// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for Apache Flink
// ------------------------------------------------------------------

Apache Flink
Copyright 2006-2019 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

flink-examples-streaming-state-machine
Copyright 2014-2018 The Apache Software Foundation

This project bundles the following dependencies under the Apache Software License 2.0. (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- org.apache.kafka:kafka-clients:0.10.2.1


flink-connector-kafka-0.10
Copyright 2014-2019 The Apache Software Foundation

flink-connector-kafka-0.9
Copyright 2014-2019 The Apache Software Foundation

flink-connector-kafka-base
Copyright 2014-2019 The Apache Software Foundation

// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for Apache Flink
// ------------------------------------------------------------------

Apache Flink
Copyright 2006-2019 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).


flink-examples-streaming-twitter
Copyright 2014-2019 The Apache Software Foundation

Apache HttpCore
Copyright 2005-2017 The Apache Software Foundation

flink-connector-twitter
Copyright 2014-2018 The Apache Software Foundation

This project bundles the following dependencies under the Apache Software License 2.0 (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- com.google.guava:guava:14.0.1
- com.twitter:hbc-core:2.2.0
- com.twitter:joauth:6.0.2
- org.apache.httpcomponents:httpclient:4.5.3
- org.apache.httpcomponents:httpcore:4.4.6

Apache HttpClient
Copyright 1999-2017 The Apache Software Foundation
3 changes: 0 additions & 3 deletions flink-connectors/flink-connector-twitter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ under the License.
</excludes>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
Expand Down
14 changes: 14 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ under the License.
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming-state-machine_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming-twitter_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-gelly-examples_${scala.binary.version}</artifactId>
Expand Down
24 changes: 24 additions & 0 deletions flink-dist/src/main/assemblies/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,30 @@ under the License.
</excludes>
</fileSet>

<!-- copy jar files of the streaming examples -->
<fileSet>
<directory>../flink-examples/flink-examples-build-helper/flink-examples-streaming-twitter/target</directory>
<outputDirectory>examples/streaming</outputDirectory>
<fileMode>0644</fileMode>
<includes>
<include>*.jar</include>
</includes>
<excludes>
<exclude>original-*.jar</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>../flink-examples/flink-examples-build-helper/flink-examples-streaming-state-machine/target</directory>
<outputDirectory>examples/streaming</outputDirectory>
<fileMode>0644</fileMode>
<includes>
<include>*.jar</include>
</includes>
<excludes>
<exclude>original-*.jar</exclude>
</excludes>
</fileSet>

<!-- copy jar files of the gelly examples -->
<fileSet>
<directory>../flink-libraries/flink-gelly-examples/target</directory>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http:https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>flink-examples-build-helper</artifactId>
<groupId>org.apache.flink</groupId>
<version>1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>flink-examples-streaming-state-machine_${scala.binary.version}</artifactId>
<name>flink-examples-streaming-state-machine</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<finalName>StateMachineExample</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</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>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.apache.flink.streaming.examples.statemachine.StateMachineExample</mainClass>
</transformer>
</transformers>
<artifactSet>
<includes>
<include>org.apache.flink:flink-connector-kafka*</include>
<include>org.apache.flink:flink-examples-streaming*</include>
<include>org.apache.kafka:*</include>
</includes>
</artifactSet>

<filters>
<filter>
<artifact>org.apache.flink:flink-examples-streaming_*</artifact>
<includes>
<include>org/apache/flink/streaming/examples/statemachine/**</include>
</includes>
</filter>
<filter>
<artifact>org.apache.kafka:*</artifact>
<excludes>
<exclude>LICENSE</exclude>
<!-- Does not contain anything relevant.
Cites a binary dependency on jersey, but this is neither reflected in the
dependency graph, nor are any jersey files bundled. -->
<exclude>NOTICE</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
flink-examples-streaming-state-machine
Copyright 2014-2018 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

This project bundles the following dependencies under the Apache Software License 2.0. (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- org.apache.kafka:kafka-clients:0.10.2.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http:https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>flink-examples-build-helper</artifactId>
<groupId>org.apache.flink</groupId>
<version>1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>flink-examples-streaming-twitter_${scala.binary.version}</artifactId>
<name>flink-examples-streaming-twitter</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<finalName>Twitter</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</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>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.apache.flink.streaming.examples.twitter.TwitterExample</mainClass>
</transformer>
</transformers>
<artifactSet>
<includes>
<include>org.apache.flink:flink-connector-twitter*</include>
<include>org.apache.flink:flink-examples-streaming*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.apache.flink:*flink-examples-streaming_*</artifact>
<includes>
<include>org/apache/flink/streaming/examples/twitter/**</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
40 changes: 40 additions & 0 deletions flink-examples/flink-examples-build-helper/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http:https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>flink-examples</artifactId>
<groupId>org.apache.flink</groupId>
<version>1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>flink-examples-build-helper</artifactId>
<packaging>pom</packaging>
<description>This is a utility module for building example jars to be used in flink-dist.</description>

<modules>
<module>flink-examples-streaming-twitter</module>
<module>flink-examples-streaming-state-machine</module>
</modules>

</project>
Loading

0 comments on commit 979ebd2

Please sign in to comment.