blob: f89b9dfaa2a9cd18c7f8ce859c8ee193635dd3c9 [file] [log] [blame]
<?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/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
<version>2.0.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-assembly</artifactId>
<name>Ambari Metrics Assembly</name>
<packaging>pom</packaging>
<version>2.0.0.0-SNAPSHOT</version>
<description>Ambari Metrics Assembly</description>
<properties>
<collector.dir>${project.basedir}/../ambari-metrics-timelineservice</collector.dir>
<monitor.dir>${project.basedir}/../ambari-metrics-host-monitoring</monitor.dir>
<aggregator.dir>${project.basedir}/../ambari-metrics-host-aggregator</aggregator.dir>
<grafana.dir>${project.basedir}/../ambari-metrics-grafana</grafana.dir>
<hadoop-sink.dir>${project.basedir}/../ambari-metrics-hadoop-sink</hadoop-sink.dir>
<storm-sink.dir>${project.basedir}/../ambari-metrics-storm-sink</storm-sink.dir>
<storm-sink-legacy.dir>${project.basedir}/../ambari-metrics-storm-sink-legacy</storm-sink-legacy.dir>
<flume-sink.dir>${project.basedir}/../ambari-metrics-flume-sink</flume-sink.dir>
<kafka-sink.dir>${project.basedir}/../ambari-metrics-kafka-sink</kafka-sink.dir>
<python.ver>python &gt;= 2.6</python.ver>
<python.devel>python-devel</python.devel>
<deb.publisher>Apache</deb.publisher>
<deb.section>universe/admin</deb.section>
<deb.architecture>i386 amd64</deb.architecture>
<deb.priority>extra</deb.priority>
<deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
<deb.architecture>amd64</deb.architecture>
<deb.dependency.list>${deb.python.ver},python-dev,gcc</deb.dependency.list>
<hadoop.sink.jar>ambari-metrics-hadoop-sink-with-common-${project.version}.jar</hadoop.sink.jar>
<storm.sink.jar>ambari-metrics-storm-sink-with-common-${project.version}.jar</storm.sink.jar>
<storm.sink.legacy.jar>ambari-metrics-storm-sink-legacy-with-common-${project.version}.jar</storm.sink.legacy.jar>
<flume.sink.jar>ambari-metrics-flume-sink-with-common-${project.version}.jar</flume.sink.jar>
<kafka.sink.jar>ambari-metrics-kafka-sink-with-common-${project.version}.jar</kafka.sink.jar>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>parse-version</id>
<phase>validate</phase>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
<execution>
<id>regex-property</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>ambariVersion</name>
<value>${project.version}</value>
<regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
<replacement>$1.$2.$3.$4</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>collector</id>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-collector-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.collector}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
<execution>
<id>monitor</id>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-monitor-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.monitor}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
<execution>
<id>grafana</id>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-grafana-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.grafana}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
<execution>
<id>hadoop-sink</id>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-hadoop-sink-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.sink}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>rpm</id>
<activation>
<property>
<name>build-rpm</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/resources/rpm</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/package/rpm</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<group>Development</group>
<needarch>x86_64</needarch>
<copyright>2012, Apache Software Foundation</copyright>
<version>${package-version}</version>
<release>${package-release}</release>
<defaultFilemode>644</defaultFilemode>
<defaultDirmode>755</defaultDirmode>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
</configuration>
<executions>
<!--ambari-metrics-collector-->
<execution>
<id>ambari-metrics-collector</id>
<phase>package</phase>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<name>ambari-metrics-collector</name>
<copyright>2012, Apache Software Foundation</copyright>
<group>Development</group>
<description>Maven Recipe: RPM Package.</description>
<autoRequires>false</autoRequires>
<requires>
<require>${python.ver}</require>
</requires>
<defaultFilemode>644</defaultFilemode>
<defaultDirmode>755</defaultDirmode>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
<mappings>
<mapping>
<!--jars-->
<directory>/usr/lib/ambari-metrics-collector/</directory>
<sources>
<source>
<location>${collector.dir}/target/lib</location>
<excludes>
<exclude>*tests.jar</exclude>
<exclude>findbugs*.jar</exclude>
<exclude>jdk.tools*.jar</exclude>
</excludes>
</source>
<source>
<location>
${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar
</location>
</source>
</sources>
</mapping>
<mapping>
<!--embedded applications-->
<directory>/usr/lib/ams-hbase/</directory>
<sources>
<source>
<location>${collector.dir}/target/embedded/${hbase.folder}</location>
<excludes>
<exclude>bin/**</exclude>
<exclude>bin/*</exclude>
<exclude>lib/*tests.jar</exclude>
<exclude>lib/findbugs*.jar</exclude>
<exclude>lib/jdk.tools*.jar</exclude>
</excludes>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ams-hbase/bin</directory>
<filemode>755</filemode>
<sources>
<source>
<location>${collector.dir}/target/embedded/${hbase.folder}/bin</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ams-hbase/lib/</directory>
<sources>
<source>
<location>${collector.dir}/target/lib</location>
<includes>
<include>phoenix*.jar</include>
<include>antlr*.jar</include>
</includes>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ams-hbase/lib/hadoop-native/</directory>
<sources>
<source>
<location>${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/sbin</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${collector.dir}/conf/unix/ambari-metrics-collector</location>
<filter>false</filter>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ambari-metrics-collector/bin</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${collector.dir}/conf/unix/sqlline</location>
<filter>false</filter>
</source>
</sources>
</mapping>
<mapping>
<directory>/etc/ambari-metrics-collector/conf</directory>
<configuration>true</configuration>
<sources>
<source>
<location>${collector.dir}/conf/unix/ams-env.sh</location>
</source>
<source>
<location>${collector.dir}/conf/unix/ams-site.xml</location>
</source>
<source>
<location>${collector.dir}/conf/unix/log4j.properties</location>
</source>
<source>
<location>${collector.dir}/conf/unix/metrics_whitelist</location>
</source>
<source>
<location>${collector.dir}/conf/unix/amshbase_metrics_whitelist</location>
</source>
<source>
<location>${collector.dir}/conf/unix/hbase-site.xml</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/etc/ams-hbase/conf</directory>
<configuration>true</configuration>
<sources>
<source>
<location>${collector.dir}/target/embedded/${hbase.folder}/conf</location>
<includes>
<include>*.*</include>
</includes>
</source>
</sources>
</mapping>
<mapping>
<directory>/var/run/ams-hbase</directory>
</mapping>
<mapping>
<directory>/var/lib/ambari-metrics-collector</directory>
</mapping>
</mappings>
</configuration>
</execution>
<!--hadoop-sink-->
<execution>
<id>ambari-metrics-hadoop-sink</id>
<phase>package</phase>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<name>ambari-metrics-hadoop-sink</name>
<copyright>2012, Apache Software Foundation</copyright>
<group>Development</group>
<description>Maven Recipe: RPM Package.</description>
<defaultDirmode>755</defaultDirmode>
<defaultFilemode>644</defaultFilemode>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
<preinstallScriptlet>
<scriptFile>${project.build.directory}/resources/rpm/sink/preinstall.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</preinstallScriptlet>
<postinstallScriptlet>
<scriptFile>${project.build.directory}/resources/rpm/sink/postinstall.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postinstallScriptlet>
<mappings>
<mapping>
<directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
<sources>
<source>
<location>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/flume/lib</directory>
<sources>
<source>
<location>${flume-sink.dir}/target/ambari-metrics-flume-sink-with-common-${project.version}.jar</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/storm/lib</directory>
<sources>
<source>
<location>${storm-sink.dir}/target/ambari-metrics-storm-sink-with-common-${project.version}.jar</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/storm/lib</directory>
<sources>
<source>
<location>${storm-sink-legacy.dir}/target/ambari-metrics-storm-sink-legacy-with-common-${project.version}.jar</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ambari-metrics-kafka-sink</directory>
<sources>
<source>
<location>${kafka-sink.dir}/target/${kafka.sink.jar}</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ambari-metrics-kafka-sink/lib</directory>
<sources>
<source>
<location>${kafka-sink.dir}/target/lib</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</execution>
<!--ambari-metrics-grafana-->
<execution>
<id>ambari-metrics-grafana</id>
<!-- unbinds rpm creation from maven lifecycle -->
<phase>package</phase>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<name>ambari-metrics-grafana</name>
<group>Development</group>
<needarch>x86_64</needarch>
<autoRequires>false</autoRequires>
<mappings>
<mapping>
<!--grafana-->
<directory>/usr/lib/ambari-metrics-grafana/</directory>
<sources>
<source>
<location>${grafana.dir}/target/grafana/${grafana.folder}</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/lib/ambari-metrics-grafana/bin</directory>
<filemode>755</filemode>
<sources>
<source>
<location>${grafana.dir}/target/grafana/${grafana.folder}/bin</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/usr/sbin</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${grafana.dir}/conf/unix/ambari-metrics-grafana</location>
<filter>false</filter>
</source>
</sources>
</mapping>
<mapping>
<directory>/etc/ambari-metrics-grafana/conf</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>${grafana.dir}/conf/unix/ams-grafana-env.sh</location>
<filter>false</filter>
</source>
</sources>
</mapping>
<mapping>
<directory>/etc/ambari-metrics-grafana/conf</directory>
<configuration>true</configuration>
<sources>
<source>
<location>${grafana.dir}/conf/unix/ams-grafana.ini</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/var/run/ambari-metrics-grafana</directory>
</mapping>
<mapping>
<directory>/var/lib/ambari-metrics-grafana</directory>
</mapping>
<mapping>
<directory>/var/log/ambari-metrics-grafana</directory>
</mapping>
</mappings>
</configuration>
</execution>
<!--ambari-metrics-monitor-->
<execution>
<id>ambari-metrics-monitor</id>
<!-- unbinds rpm creation from maven lifecycle -->
<phase>package</phase>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<name>ambari-metrics-monitor</name>
<group>Development</group>
<needarch>x86_64</needarch>
<autoRequires>false</autoRequires>
<requires>
<require>${python.ver}</require>
<require>gcc</require>
<require>${python.devel}</require>
</requires>
<preremoveScriptlet>
<scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</preremoveScriptlet>
<mappings>
<mapping>
<directory>${resmonitor.install.dir}</directory>
<username>root</username>
<groupname>root</groupname>
<sources>
<source>
<location>
${monitor.dir}/src/main/python/__init__.py
</location>
</source>
<source>
<location>
${monitor.dir}/src/main/python/main.py
</location>
</source>
</sources>
</mapping>
<mapping>
<directory>${resmonitor.install.dir}/core</directory>
<sources>
<source>
<location>
${monitor.dir}/src/main/python/core
</location>
</source>
</sources>
</mapping>
<mapping>
<directory>${resmonitor.install.dir}/psutil</directory>
<sources>
<source>
<location>
${monitor.dir}/src/main/python/psutil
</location>
<excludes>
<exclude>build/**</exclude>
<exclude>build/*</exclude>
</excludes>
</source>
</sources>
</mapping>
<mapping>
<directory>${resmonitor.install.dir}/ambari_commons</directory>
<sources>
<source>
<location>
${project.basedir}/../../ambari-common/src/main/python/ambari_commons
</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/var/lib/ambari-metrics-monitor/lib</directory>
<sources>
<source>
<location>
${aggregator.dir}/target/
</location>
<includes>
<include>ambari-metrics-host-aggregator-${project.version}.jar</include>
</includes>
</source>
</sources>
</mapping>
<mapping>
<directory>/etc/ambari-metrics-monitor/conf</directory>
<configuration>true</configuration>
</mapping>
<mapping>
<directory>/usr/sbin</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
<location>
${monitor.dir}/conf/unix/ambari-metrics-monitor
</location>
<filter>true</filter>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deb</id>
<activation>
<property>
<name>build-deb</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/resources/deb/control</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/package/deb/control</directory>
<excludes>
<exclude>postinst</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>
<directory>${project.basedir}/src/main/package/deb/control</directory>
<includes>
<include>postinst</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.0.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
</execution>
</executions>
<configuration>
<controlDir>${project.build.directory}/resources/deb/control</controlDir>
<deb>${basedir}/target/${project.artifactId}_${package-version}-${package-release}.deb</deb>
<dataSet>
<data>
<type>file</type>
<src>${monitor.dir}/src/main/python/__init__.py</src>
<mapper>
<type>perm</type>
<prefix>${resmonitor.install.dir}</prefix>
<!-- TODO: Figure out if file perms should be set -->
<!--user>root</user>
<group>root</group-->
<filemode>755</filemode>
</mapper>
</data>
<data>
<type>file</type>
<src>${monitor.dir}/src/main/python/main.py</src>
<mapper>
<type>perm</type>
<prefix>${resmonitor.install.dir}</prefix>
<filemode>755</filemode>
</mapper>
</data>
<data>
<type>directory</type>
<src>${monitor.dir}/src/main/python/core</src>
<mapper>
<type>perm</type>
<prefix>${resmonitor.install.dir}/core</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${monitor.dir}/src/main/python/psutil</src>
<excludes>build/**</excludes>
<mapper>
<type>perm</type>
<prefix>${resmonitor.install.dir}/psutil</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${project.basedir}/../../ambari-common/src/main/python/ambari_commons</src>
<mapper>
<type>perm</type>
<prefix>${resmonitor.install.dir}/ambari_commons</prefix>
</mapper>
</data>
<data>
<type>template</type>
<paths>
<path>/etc/ambari-metrics-monitor/conf</path>
<path>/etc/ambari-metrics-collector/conf</path>
<path>/etc/ambari-metrics-grafana/conf</path>
<path>/etc/ams-hbase/conf</path>
<path>/var/run/ams-hbase</path>
<path>/var/run/ambari-metrics-grafana</path>
<path>/var/log/ambari-metrics-grafana</path>
<path>/var/lib/ambari-metrics-collector</path>
<path>/var/lib/ambari-metrics-monitor/lib</path>
<path>/var/lib/ambari-metrics-grafana</path>
<path>/usr/lib/ambari-metrics-hadoop-sink</path>
<path>/usr/lib/ambari-metrics-kafka-sink</path>
<path>/usr/lib/ambari-metrics-kafka-sink/lib</path>
<path>/usr/lib/flume/lib</path>
<path>/usr/lib/storm/lib</path>
</paths>
</data>
<data>
<src>${monitor.dir}/conf/unix/metric_groups.conf</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/etc/ambari-metrics-monitor/conf</prefix>
<filemode>644</filemode>
</mapper>
</data>
<data>
<src>${monitor.dir}/conf/unix/metric_monitor.ini</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/etc/ambari-metrics-monitor/conf</prefix>
<filemode>644</filemode>
</mapper>
</data>
<data>
<src>${monitor.dir}/conf/unix/ambari-metrics-monitor</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/sbin</prefix>
<filemode>755</filemode>
</mapper>
</data>
<!-- Metric collector -->
<data>
<src>${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar</src>
<type>file</type>
<mapper>
<type>perm</type>
<dirmode>644</dirmode>
<prefix>/usr/lib/ambari-metrics-collector</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/target/lib</src>
<type>directory</type>
<excludes>*tests.jar</excludes>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/usr/lib/ambari-metrics-collector</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/target/embedded/${hbase.folder}</src>
<type>directory</type>
<excludes>bin/**,bin/*,lib/*tests.jar</excludes>
<mapper>
<type>perm</type>
<prefix>/usr/lib/ams-hbase</prefix>
<filemode>644</filemode>
</mapper>
</data>
<data>
<src>${collector.dir}/target/embedded/${hbase.folder}/bin</src>
<type>directory</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/usr/lib/ams-hbase/bin</prefix>
</mapper>
</data>
<data>
<src>${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native</src>
<type>directory</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/usr/lib/ams-hbase/lib/hadoop-native</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/target/lib</src>
<type>directory</type>
<includes>phoenix*.jar,antlr*.jar</includes>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/usr/lib/ams-hbase/lib</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/ambari-metrics-collector</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/usr/sbin</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/ams-env.sh</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/etc/ambari-metrics-collector/conf</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/ams-site.xml</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/etc/ambari-metrics-collector/conf</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/log4j.properties</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/etc/ambari-metrics-collector/conf</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/metrics_whitelist</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/etc/ambari-metrics-collector/conf</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/amshbase_metrics_whitelist</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/etc/ambari-metrics-collector/conf</prefix>
</mapper>
</data>
<data>
<src>${collector.dir}/conf/unix/hbase-site.xml</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/etc/ambari-metrics-collector/conf</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${collector.dir}/target/embedded/${hbase.folder}/conf</src>
<mapper>
<type>perm</type>
<dirmode>755</dirmode>
<filemode>644</filemode>
<prefix>/etc/ams-hbase/conf</prefix>
</mapper>
</data>
<!-- Metric Grafana -->
<data>
<src>${grafana.dir}/target/grafana/${grafana.folder}</src>
<type>directory</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/usr/lib/ambari-metrics-grafana</prefix>
</mapper>
</data>
<data>
<src>${grafana.dir}/target/grafana/${grafana.folder}/bin</src>
<type>directory</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/usr/lib/ambari-metrics-grafana/bin</prefix>
</mapper>
</data>
<data>
<src>${grafana.dir}/conf/unix/ambari-metrics-grafana</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/usr/sbin</prefix>
</mapper>
</data>
<data>
<src>${grafana.dir}/conf/unix/ams-grafana-env.sh</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
<prefix>/etc/ambari-metrics-grafana/conf</prefix>
</mapper>
</data>
<data>
<src>${grafana.dir}/conf/unix/ams-grafana.ini</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<prefix>/etc/ambari-metrics-grafana/conf</prefix>
</mapper>
</data>
<!-- hadoop sink -->
<data>
<src>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<dirmode>755</dirmode>
<prefix>/usr/lib/ambari-metrics-hadoop-sink</prefix>
</mapper>
</data>
<!-- flume sink -->
<data>
<src>${flume-sink.dir}/target/${flume.sink.jar}</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<dirmode>755</dirmode>
<prefix>/usr/lib/flume/lib</prefix>
</mapper>
</data>
<!-- storm sinks -->
<data>
<src>${storm-sink.dir}/target/${storm.sink.jar}</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<dirmode>755</dirmode>
<prefix>/usr/lib/storm/lib</prefix>
</mapper>
</data>
<data>
<src>${storm-sink-legacy.dir}/target/${storm.sink.legacy.jar}</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<dirmode>755</dirmode>
<prefix>/usr/lib/storm/lib</prefix>
</mapper>
</data>
<!-- kafka sink -->
<data>
<src>${kafka-sink.dir}/target/${kafka.sink.jar}</src>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<dirmode>755</dirmode>
<prefix>/usr/lib/ambari-metrics-kafka-sink</prefix>
</mapper>
</data>
<data>
<src>${kafka-sink.dir}/target/lib</src>
<type>directory</type>
<mapper>
<type>perm</type>
<filemode>644</filemode>
<dirmode>755</dirmode>
<prefix>/usr/lib/ambari-metrics-kafka-sink/lib</prefix>
</mapper>
</data>
</dataSet>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>linux</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<envClassifier>linux</envClassifier>
<dirsep>/</dirsep>
<pathsep>:</pathsep>
<executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
<executable.shell>sh</executable.shell>
<fileextension.shell>sh</fileextension.shell>
<fileextension.dot.shell-default></fileextension.dot.shell-default>
<assemblydescriptor.collector>src/main/assembly/collector.xml</assemblydescriptor.collector>
<assemblydescriptor.monitor>src/main/assembly/monitor.xml</assemblydescriptor.monitor>
<assemblydescriptor.sink>src/main/assembly/sink.xml</assemblydescriptor.sink>
<assemblydescriptor.grafana>src/main/assembly/grafana.xml</assemblydescriptor.grafana>
<packagingFormat>jar</packagingFormat>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>download-hadoop</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="Downloading Hadoop">
<mkdir dir="${project.build.directory}/embedded" />
<get
src="${hadoop.tar}"
dest="${project.build.directory}/embedded/hadoop.tar.gz"
usetimestamp="true"
/>
<untar
src="${project.build.directory}/embedded/hadoop.tar.gz"
dest="${project.build.directory}/embedded"
compression="gzip"
/>
<!-- Resolving symlinks-->
<move todir="${project.build.directory}/embedded/${hadoop.folder}/lib/native/">
<fileset dir="${project.build.directory}/embedded/${hadoop.folder}/lib/native/"/>
<mapper type="regexp" from="libsnappy.so.1.*.*" to="libsnappy.so.1"/>
</move>
<move
file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhdfs.so.0.0.0"
tofile="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhdfs.so"
/>
<move
file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhadoop.so.1.0.0"
tofile="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhadoop.so"
/>
<delete file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libsnappy.so"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>win</family>
</os>
</activation>
<properties>
<envClassifier>win</envClassifier>
<dirsep>\</dirsep>
<pathsep>;</pathsep>
<executable.python>python</executable.python>
<executable.shell>cmd</executable.shell>
<fileextension.shell>cmd</fileextension.shell>
<fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
<assemblydescriptor.collector>src/main/assembly/collector-windows.xml</assemblydescriptor.collector>
<assemblydescriptor.monitor>src/main/assembly/monitor-windows.xml</assemblydescriptor.monitor>
<assemblydescriptor.sink>src/main/assembly/sink-windows.xml</assemblydescriptor.sink>
<assemblydescriptor.collector.choco>src/main/assembly/collector-windows-choco.xml</assemblydescriptor.collector.choco>
<assemblydescriptor.monitor.choco>src/main/assembly/monitor-windows-choco.xml</assemblydescriptor.monitor.choco>
<assemblydescriptor.sink.choco>src/main/assembly/sink-windows-choco.xml</assemblydescriptor.sink.choco>
<packagingFormat>jar</packagingFormat>
<python.build.version>2.7</python.build.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>download-hadoop</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="Downloading Hadoop">
<mkdir dir="${project.build.directory}/embedded" />
<get
src="${hadoop.winpkg.zip}"
dest="${project.build.directory}/embedded/hadoop.zip"
usetimestamp="true"
/>
<unzip
src="${project.build.directory}/embedded/hadoop.zip"
dest="${project.build.directory}/embedded/hadoop.temp"
/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>choco</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<build>
<plugins>
<!-- choco package creation -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>collector-choco-dir</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-collector-${project.version}-choco</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.collector.choco}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
<execution>
<id>monitor-choco-dir</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-monitor-${project.version}-choco</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.monitor.choco}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
<execution>
<id>hadoop-sink-choco-dir</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<finalName>ambari-metrics-hadoop-sink-${project.version}-choco</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${assemblydescriptor.sink.choco}</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>collector-choco-package</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>choco.exe</executable>
<arguments>
<argument>pack</argument>
<argument>--version=${project.version}</argument>
<argument>${basedir}/target/ambari-metrics-collector-${project.version}-choco/ambari-metrics-collector.nuspec</argument>
</arguments>
<workingDirectory>target/ambari-metrics-collector-${project.version}-choco</workingDirectory>
</configuration>
</execution>
<execution>
<id>monitor-choco-package</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>choco.exe</executable>
<arguments>
<argument>pack</argument>
<argument>--version=${project.version}</argument>
<argument>${basedir}/target/ambari-metrics-monitor-${project.version}-choco/ambari-metrics-monitor.nuspec</argument>
</arguments>
<workingDirectory>target/ambari-metrics-monitor-${project.version}-choco</workingDirectory>
</configuration>
</execution>
<execution>
<id>hadoop-sink-choco-package</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>choco.exe</executable>
<arguments>
<argument>pack</argument>
<argument>--version=${project.version}</argument>
<argument>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}-choco/ambari-metrics-hadoop-sink.nuspec</argument>
</arguments>
<workingDirectory>target/ambari-metrics-hadoop-sink-${project.version}-choco</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-timelineservice</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-hadoop-sink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-flume-sink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-storm-sink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-storm-sink-legacy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-kafka-sink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-host-monitoring</artifactId>
<version>${project.version}</version>
<type>pom</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-host-aggregator</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>