You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2020/05/19 13:38:10 UTC
[flink] 02/02: [FLINK-16970][dist] Bundle JMXReporter separately
from dist jar
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
commit fbe388fca460979aa049a904c64201ec42b7cd1f
Author: molsionmo <52...@users.noreply.github.com>
AuthorDate: Tue May 19 21:27:11 2020 +0800
[FLINK-16970][dist] Bundle JMXReporter separately from dist jar
---
flink-dist/pom.xml | 27 ++++++++++++++-----
flink-dist/src/main/assemblies/plugins.xml | 42 ++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 6 deletions(-)
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index 87718be..558ad57 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -100,12 +100,6 @@ under the License.
<artifactId>flink-metrics-core</artifactId>
<version>${project.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.flink</groupId>
- <artifactId>flink-metrics-jmx_${scala.binary.version}</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.flink</groupId>
@@ -280,6 +274,13 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
+ <artifactId>flink-metrics-jmx_${scala.binary.version}</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
<artifactId>flink-metrics-statsd</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
@@ -793,6 +794,20 @@ under the License.
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
+ <execution>
+ <id>plugins</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assemblies/plugins.xml</descriptor>
+ </descriptors>
+ <finalName>flink-${project.version}-bin</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
</executions>
</plugin>
diff --git a/flink-dist/src/main/assemblies/plugins.xml b/flink-dist/src/main/assemblies/plugins.xml
new file mode 100644
index 0000000..7c0baed
--- /dev/null
+++ b/flink-dist/src/main/assemblies/plugins.xml
@@ -0,0 +1,42 @@
+<!--
+ ~ 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>plugins</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>flink-${project.version}</baseDirectory>
+
+ <files>
+ <!-- Metrics -->
+
+ <file>
+ <source>../flink-metrics/flink-metrics-jmx/target/flink-metrics-jmx_${scala.binary.version}-${project.version}.jar</source>
+ <outputDirectory>plugins/metrics_jmx/</outputDirectory>
+ <destName>flink-metrics-jmx-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+ </files>
+
+</assembly>