提交 979ebd21 编写于 作者: Z zentol 提交者: Chesnay Schepler

[FLINK-11289][examples] Rework examples to account for licensing

上级 b56197a3
......@@ -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://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
......@@ -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://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://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://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://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
\ No newline at end of file
......@@ -94,9 +94,6 @@ under the License.
</excludes>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
......
......@@ -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>
......
......@@ -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>
......
<?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://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://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>
<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>
flink-examples-streaming-state-machine
Copyright 2014-2018 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This project bundles the following dependencies under the Apache Software License 2.0. (http://www.apache.org/licenses/LICENSE-2.0.txt)
- org.apache.kafka:kafka-clients:0.10.2.1
<?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://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://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>
<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>
<?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://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://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>
<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>
......@@ -491,80 +491,6 @@ under the License.
</execution>
</executions>
</plugin>
<!-- Use the shade plugin to build a fat jar for the kafka example -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<!-- State Machine Example -->
<execution>
<id>state-machine-example</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>
<finalName>StateMachineExample</finalName>
<filters>
<filter>
<artifact>*</artifact>
<includes>
<include>org/apache/flink/streaming/examples/statemachine/**</include>
<include>org/apache/flink/streaming/util/serialization/**</include>
<include>org/apache/flink/streaming/connectors/kafka/**</include>
<include>org/apache/kafka/**</include>
<include>kafka/</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
<execution>
<id>fat-jar-twitter-example</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>
<finalName>Twitter</finalName>
<filters>
<filter>
<artifact>*</artifact>
<includes>
<include>org/apache/flink/twitter/shaded/com/google/common/**</include>
<include>org/apache/flink/streaming/examples/twitter/**</include>
<include>org/apache/flink/streaming/connectors/twitter/**</include>
<include>org/apache/http/**</include>
<include>com/twitter/**</include>
<include>build.properties</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
......
......@@ -36,6 +36,7 @@ under the License.
<module>flink-examples-batch</module>
<module>flink-examples-streaming</module>
<module>flink-examples-table</module>
<module>flink-examples-build-helper</module>
</modules>
<dependencies>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册