You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2016/12/20 16:49:09 UTC
[04/10] flink git commit: [FLINK-4861] [build] Package optional
project artifacts
[FLINK-4861] [build] Package optional project artifacts
Package the Flink connectors, metrics, and libraries into subdirectories
of a new opt directory in the release/snapshot tarballs.
This closes #3014
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/5c76baa1
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/5c76baa1
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/5c76baa1
Branch: refs/heads/master
Commit: 5c76baa1734303a01472afd17cfaf3442eb06c43
Parents: cefb8db
Author: Greg Hogan <co...@greghogan.com>
Authored: Thu Dec 15 15:49:07 2016 -0500
Committer: Stephan Ewen <se...@apache.org>
Committed: Tue Dec 20 17:01:43 2016 +0100
----------------------------------------------------------------------
flink-dist/pom.xml | 80 +++++++++++++++++++
flink-dist/src/main/assemblies/opt.xml | 106 +++++++++++++++++++++++++
flink-libraries/flink-gelly-scala/pom.xml | 34 ++++++--
flink-libraries/flink-ml/pom.xml | 19 +++++
4 files changed, 231 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/5c76baa1/flink-dist/pom.xml
----------------------------------------------------------------------
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index 25dc708..6e9edf1 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -154,6 +154,72 @@ under the License.
<artifactId>log4j</artifactId>
<scope>compile</scope>
</dependency>
+
+ <!-- the following dependencies are packaged in opt/ -->
+
+ <!-- start optional Flink metrics reporters -->
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-metrics-dropwizard</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-metrics-ganglia</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-metrics-graphite</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-metrics-statsd</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- end optional Flink metrics reporters -->
+
+ <!-- start optional Flink libraries -->
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-cep_2.10</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-cep-scala_2.10</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-gelly_2.10</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-gelly-scala_2.10</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-gelly-examples_2.10</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-ml_2.10</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- end optional Flink libraries -->
</dependencies>
<profiles>
@@ -293,6 +359,20 @@ under the License.
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
+ <execution>
+ <id>opt</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assemblies/opt.xml</descriptor>
+ </descriptors>
+ <finalName>flink-${project.version}-bin</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
http://git-wip-us.apache.org/repos/asf/flink/blob/5c76baa1/flink-dist/src/main/assemblies/opt.xml
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/assemblies/opt.xml b/flink-dist/src/main/assemblies/opt.xml
new file mode 100644
index 0000000..c6dc307
--- /dev/null
+++ b/flink-dist/src/main/assemblies/opt.xml
@@ -0,0 +1,106 @@
+<!--
+ ~ 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.
+ -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>opt</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>flink-${project.version}</baseDirectory>
+
+ <files>
+ <!-- CEP -->
+ <file>
+ <source>../flink-libraries/flink-cep/target/flink-cep_2.10-${project.version}.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-cep_2.10-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <file>
+ <source>../flink-libraries/flink-cep-scala/target/flink-cep-scala_2.10-${project.version}.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-cep-scala_2.10-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <!-- Gelly -->
+ <file>
+ <source>../flink-libraries/flink-gelly/target/flink-gelly_2.10-${project.version}.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-gelly_2.10-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <file>
+ <source>../flink-libraries/flink-gelly-examples/target/flink-gelly-examples_2.10-${project.version}.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-gelly-examples_2.10-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <file>
+ <source>../flink-libraries/flink-gelly-scala/target/flink-gelly-scala_2.10-${project.version}-jar-with-dependencies.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-gelly-scala_2.10-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <!-- ML -->
+ <file>
+ <source>../flink-libraries/flink-ml/target/flink-ml_2.10-${project.version}-jar-with-dependencies.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-ml_2.10-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <!-- Metrics -->
+ <file>
+ <source>../flink-metrics/flink-metrics-dropwizard/target/flink-metrics-dropwizard-${project.version}-jar-with-dependencies.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-metrics-dropwizard-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <file>
+ <source>../flink-metrics/flink-metrics-ganglia/target/flink-metrics-ganglia-${project.version}-jar-with-dependencies.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-metrics-ganglia-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <file>
+ <source>../flink-metrics/flink-metrics-graphite/target/flink-metrics-graphite-${project.version}-jar-with-dependencies.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-metrics-graphite-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+
+ <file>
+ <source>../flink-metrics/flink-metrics-statsd/target/flink-metrics-statsd-${project.version}.jar</source>
+ <outputDirectory>opt/</outputDirectory>
+ <destName>flink-metrics-statsd-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+ </files>
+</assembly>
http://git-wip-us.apache.org/repos/asf/flink/blob/5c76baa1/flink-libraries/flink-gelly-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly-scala/pom.xml b/flink-libraries/flink-gelly-scala/pom.xml
index 69a7bfb..ee4549c 100644
--- a/flink-libraries/flink-gelly-scala/pom.xml
+++ b/flink-libraries/flink-gelly-scala/pom.xml
@@ -56,14 +56,6 @@ under the License.
<version>${project.version}</version>
</dependency>
- <!-- We need to add this explicitly because through shading the dependency on asm seems
- to go away. -->
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
- <version>${asm.version}</version>
- </dependency>
-
<!-- the dependencies below are already provided in Flink -->
<dependency>
@@ -83,6 +75,13 @@ under the License.
<artifactId>scala-compiler</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>${asm.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- test dependencies -->
@@ -216,6 +215,25 @@ under the License.
<configLocation>${project.basedir}/../../tools/maven/scalastyle-config.xml</configLocation>
</configuration>
</plugin>
+
+ <!-- build a har-with-dependencies, to be included in the 'opt' build folder -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/flink/blob/5c76baa1/flink-libraries/flink-ml/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-ml/pom.xml b/flink-libraries/flink-ml/pom.xml
index c1a9a39..e6b8530 100644
--- a/flink-libraries/flink-ml/pom.xml
+++ b/flink-libraries/flink-ml/pom.xml
@@ -181,6 +181,25 @@
<configLocation>${project.basedir}/../../tools/maven/scalastyle-config.xml</configLocation>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>