提交 5c76baa1 编写于 作者: G Greg Hogan 提交者: Stephan Ewen

[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
上级 cefb8db3
......@@ -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>
......
<!--
~ 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>
......@@ -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>
......
......@@ -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>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册