pom.xml 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements. See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership. The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License. You may obtain a copy of the License at
  10. ~
  11. ~ http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing, software
  14. ~ distributed under the License is distributed on an "AS IS" BASIS,
  15. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. ~ See the License for the specific language governing permissions and
  17. ~ limitations under the License.
  18. -->
  19. <project xmlns="http://maven.apache.org/POM/4.0.0"
  20. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  22. <parent>
  23. <artifactId>ambari-metrics</artifactId>
  24. <groupId>org.apache.ambari</groupId>
  25. <version>0.1.0-SNAPSHOT</version>
  26. </parent>
  27. <modelVersion>4.0.0</modelVersion>
  28. <artifactId>ambari-metrics-assembly</artifactId>
  29. <packaging>pom</packaging>
  30. <version>0.1.0-SNAPSHOT</version>
  31. <properties>
  32. <collector.dir>${project.basedir}/../ambari-metrics-timelineservice</collector.dir>
  33. <monitor.dir>${project.basedir}/../ambari-metrics-host-monitoring</monitor.dir>
  34. <hadoop-sink.dir>${project.basedir}/../ambari-metrics-hadoop-sink</hadoop-sink.dir>
  35. <storm-sink.dir>${project.basedir}/../ambari-metrics-storm-sink</storm-sink.dir>
  36. <flume-sink.dir>${project.basedir}/../ambari-metrics-flume-sink</flume-sink.dir>
  37. <python.ver>python &gt;= 2.6</python.ver>
  38. <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
  39. <deb.architecture>amd64</deb.architecture>
  40. <deb.dependency.list>${deb.python.ver},python-dev,gcc</deb.dependency.list>
  41. <hadoop.sink.jar>ambari-metrics-hadoop-sink-with-common-${project.version}.jar</hadoop.sink.jar>
  42. <storm.sink.jar>ambari-metrics-storm-sink-with-common-${project.version}.jar</storm.sink.jar>
  43. <flume.sink.jar>ambari-metrics-flume-sink-with-common-${project.version}.jar</flume.sink.jar>
  44. </properties>
  45. <build>
  46. <plugins>
  47. <plugin>
  48. <groupId>org.codehaus.mojo</groupId>
  49. <artifactId>build-helper-maven-plugin</artifactId>
  50. <version>1.8</version>
  51. <executions>
  52. <execution>
  53. <id>parse-version</id>
  54. <phase>validate</phase>
  55. <goals>
  56. <goal>parse-version</goal>
  57. </goals>
  58. </execution>
  59. <execution>
  60. <id>regex-property</id>
  61. <goals>
  62. <goal>regex-property</goal>
  63. </goals>
  64. <configuration>
  65. <name>ambariVersion</name>
  66. <value>${project.version}</value>
  67. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  68. <replacement>$1.$2.$3</replacement>
  69. <failIfNoMatch>false</failIfNoMatch>
  70. </configuration>
  71. </execution>
  72. </executions>
  73. </plugin>
  74. <plugin>
  75. <artifactId>maven-assembly-plugin</artifactId>
  76. <executions>
  77. <execution>
  78. <id>collector</id>
  79. <phase>package</phase>
  80. <goals>
  81. <goal>single</goal>
  82. </goals>
  83. <configuration>
  84. <attach>false</attach>
  85. <finalName>ambari-metrics-collector-${project.version}</finalName>
  86. <appendAssemblyId>false</appendAssemblyId>
  87. <descriptors>
  88. <descriptor>${assemblydescriptor.collector}</descriptor>
  89. </descriptors>
  90. <tarLongFileMode>gnu</tarLongFileMode>
  91. </configuration>
  92. </execution>
  93. <execution>
  94. <id>monitor</id>
  95. <phase>package</phase>
  96. <goals>
  97. <goal>single</goal>
  98. </goals>
  99. <configuration>
  100. <attach>false</attach>
  101. <finalName>ambari-metrics-monitor-${project.version}</finalName>
  102. <appendAssemblyId>false</appendAssemblyId>
  103. <descriptors>
  104. <descriptor>${assemblydescriptor.monitor}</descriptor>
  105. </descriptors>
  106. <tarLongFileMode>gnu</tarLongFileMode>
  107. </configuration>
  108. </execution>
  109. <execution>
  110. <id>hadoop-sink</id>
  111. <phase>package</phase>
  112. <goals>
  113. <goal>single</goal>
  114. </goals>
  115. <configuration>
  116. <attach>false</attach>
  117. <finalName>ambari-metrics-hadoop-sink-${project.version}</finalName>
  118. <appendAssemblyId>false</appendAssemblyId>
  119. <descriptors>
  120. <descriptor>${assemblydescriptor.sink}</descriptor>
  121. </descriptors>
  122. <tarLongFileMode>gnu</tarLongFileMode>
  123. </configuration>
  124. </execution>
  125. </executions>
  126. </plugin>
  127. </plugins>
  128. </build>
  129. <profiles>
  130. <profile>
  131. <id>rpm</id>
  132. <activation>
  133. <property>
  134. <name>build-rpm</name>
  135. </property>
  136. </activation>
  137. <build>
  138. <plugins>
  139. <plugin>
  140. <artifactId>maven-resources-plugin</artifactId>
  141. <version>2.7</version>
  142. <executions>
  143. <execution>
  144. <id>copy-resources</id>
  145. <phase>prepare-package</phase>
  146. <goals>
  147. <goal>copy-resources</goal>
  148. </goals>
  149. <configuration>
  150. <outputDirectory>${project.build.directory}/resources/rpm</outputDirectory>
  151. <resources>
  152. <resource>
  153. <directory>${project.basedir}/src/main/package/rpm</directory>
  154. <filtering>true</filtering>
  155. </resource>
  156. </resources>
  157. </configuration>
  158. </execution>
  159. </executions>
  160. </plugin>
  161. <plugin>
  162. <groupId>org.codehaus.mojo</groupId>
  163. <artifactId>rpm-maven-plugin</artifactId>
  164. <version>2.0.1</version>
  165. <configuration>
  166. <group>Development</group>
  167. <needarch>x86_64</needarch>
  168. <copyright>2012, Apache Software Foundation</copyright>
  169. <version>${package-version}</version>
  170. <release>${package-release}</release>
  171. <defaultFilemode>644</defaultFilemode>
  172. <defaultDirmode>755</defaultDirmode>
  173. <defaultUsername>root</defaultUsername>
  174. <defaultGroupname>root</defaultGroupname>
  175. </configuration>
  176. <executions>
  177. <!--ambari-metrics-monitor-->
  178. <execution>
  179. <id>ambari-metrics-monitor</id>
  180. <!-- unbinds rpm creation from maven lifecycle -->
  181. <phase>package</phase>
  182. <goals>
  183. <goal>rpm</goal>
  184. </goals>
  185. <configuration>
  186. <name>ambari-metrics-monitor</name>
  187. <group>Development</group>
  188. <needarch>x86_64</needarch>
  189. <autoRequires>false</autoRequires>
  190. <requires>
  191. <require>${python.ver}</require>
  192. <require>gcc</require>
  193. <require>python-devel</require>
  194. </requires>
  195. <preremoveScriptlet>
  196. <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
  197. <fileEncoding>utf-8</fileEncoding>
  198. </preremoveScriptlet>
  199. <mappings>
  200. <mapping>
  201. <directory>${resmonitor.install.dir}</directory>
  202. <username>root</username>
  203. <groupname>root</groupname>
  204. <sources>
  205. <source>
  206. <location>
  207. ${monitor.dir}/src/main/python/__init__.py
  208. </location>
  209. </source>
  210. <source>
  211. <location>
  212. ${monitor.dir}/src/main/python/main.py
  213. </location>
  214. </source>
  215. </sources>
  216. </mapping>
  217. <mapping>
  218. <directory>${resmonitor.install.dir}/core</directory>
  219. <sources>
  220. <source>
  221. <location>
  222. ${monitor.dir}/src/main/python/core
  223. </location>
  224. </source>
  225. </sources>
  226. </mapping>
  227. <mapping>
  228. <directory>${resmonitor.install.dir}/psutil</directory>
  229. <sources>
  230. <source>
  231. <location>
  232. ${monitor.dir}/src/main/python/psutil
  233. </location>
  234. <excludes>
  235. <exclude>build/**</exclude>
  236. <exclude>build/*</exclude>
  237. </excludes>
  238. </source>
  239. </sources>
  240. </mapping>
  241. <mapping>
  242. <directory>/etc/ambari-metrics-monitor/conf</directory>
  243. <configuration>true</configuration>
  244. </mapping>
  245. <mapping>
  246. <directory>/var/run/ambari-metrics-monitor</directory>
  247. </mapping>
  248. <mapping>
  249. <directory>/var/log/ambari-metrics-monitor</directory>
  250. </mapping>
  251. <mapping>
  252. <directory>/usr/sbin</directory>
  253. <filemode>755</filemode>
  254. <username>root</username>
  255. <groupname>root</groupname>
  256. <directoryIncluded>false</directoryIncluded>
  257. <sources>
  258. <source>
  259. <location>
  260. ${monitor.dir}/conf/unix/ambari-metrics-monitor
  261. </location>
  262. <filter>true</filter>
  263. </source>
  264. </sources>
  265. </mapping>
  266. </mappings>
  267. </configuration>
  268. </execution>
  269. <!--ambari-metrics-collector-->
  270. <execution>
  271. <id>ambari-metrics-collector</id>
  272. <phase>package</phase>
  273. <goals>
  274. <goal>rpm</goal>
  275. </goals>
  276. <configuration>
  277. <name>ambari-metrics-collector</name>
  278. <copyright>2012, Apache Software Foundation</copyright>
  279. <group>Development</group>
  280. <description>Maven Recipe: RPM Package.</description>
  281. <autoRequires>false</autoRequires>
  282. <requires>
  283. <require>${python.ver}</require>
  284. </requires>
  285. <defaultFilemode>644</defaultFilemode>
  286. <defaultDirmode>755</defaultDirmode>
  287. <defaultUsername>root</defaultUsername>
  288. <defaultGroupname>root</defaultGroupname>
  289. <mappings>
  290. <mapping>
  291. <!--jars-->
  292. <directory>/usr/lib/ambari-metrics-collector/</directory>
  293. <sources>
  294. <source>
  295. <location>${collector.dir}/target/lib</location>
  296. </source>
  297. <source>
  298. <location>
  299. ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar
  300. </location>
  301. </source>
  302. </sources>
  303. </mapping>
  304. <mapping>
  305. <!--embedded applications-->
  306. <directory>/usr/lib/ams-hbase/</directory>
  307. <sources>
  308. <source>
  309. <location>${collector.dir}/target/embedded/${hbase.folder}</location>
  310. <excludes>
  311. <exclude>bin/**</exclude>
  312. <exclude>bin/*</exclude>
  313. </excludes>
  314. </source>
  315. </sources>
  316. </mapping>
  317. <mapping>
  318. <directory>/usr/lib/ams-hbase/bin</directory>
  319. <filemode>755</filemode>
  320. <sources>
  321. <source>
  322. <location>${collector.dir}/target/embedded/${hbase.folder}/bin</location>
  323. </source>
  324. </sources>
  325. </mapping>
  326. <mapping>
  327. <directory>/usr/lib/ams-hbase/lib/</directory>
  328. <sources>
  329. <source>
  330. <location>${collector.dir}/target/lib</location>
  331. <includes>
  332. <include>phoenix*.jar</include>
  333. <include>antlr*.jar</include>
  334. </includes>
  335. </source>
  336. </sources>
  337. </mapping>
  338. <mapping>
  339. <directory>/usr/sbin</directory>
  340. <filemode>755</filemode>
  341. <username>root</username>
  342. <groupname>root</groupname>
  343. <directoryIncluded>false</directoryIncluded>
  344. <sources>
  345. <source>
  346. <location>${collector.dir}/conf/unix/ambari-metrics-collector</location>
  347. <filter>false</filter>
  348. </source>
  349. </sources>
  350. </mapping>
  351. <mapping>
  352. <directory>/etc/ambari-metrics-collector/conf</directory>
  353. <configuration>true</configuration>
  354. <sources>
  355. <source>
  356. <location>${collector.dir}/conf/unix/ams-env.sh</location>
  357. </source>
  358. <source>
  359. <location>${collector.dir}/conf/unix/ams-site.xml</location>
  360. </source>
  361. <source>
  362. <location>${collector.dir}/conf/unix/log4j.properties</location>
  363. </source>
  364. <source>
  365. <location>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  366. </source>
  367. </sources>
  368. </mapping>
  369. <mapping>
  370. <directory>/etc/ams-hbase/conf</directory>
  371. <configuration>true</configuration>
  372. <sources>
  373. <source>
  374. <location>${collector.dir}/target/embedded/${hbase.folder}/conf</location>
  375. <includes>
  376. <include>*.*</include>
  377. </includes>
  378. </source>
  379. </sources>
  380. </mapping>
  381. <mapping>
  382. <directory>/var/run/ams-hbase</directory>
  383. </mapping>
  384. <mapping>
  385. <directory>/var/run/ambari-metrics-collector</directory>
  386. </mapping>
  387. <mapping>
  388. <directory>/var/log/ambari-metrics-collector</directory>
  389. </mapping>
  390. <mapping>
  391. <directory>/var/lib/ambari-metrics-collector</directory>
  392. </mapping>
  393. </mappings>
  394. </configuration>
  395. </execution>
  396. <!--hadoop-sink-->
  397. <execution>
  398. <id>ambari-metrics-hadoop-sink</id>
  399. <phase>package</phase>
  400. <goals>
  401. <goal>rpm</goal>
  402. </goals>
  403. <configuration>
  404. <name>ambari-metrics-hadoop-sink</name>
  405. <copyright>2012, Apache Software Foundation</copyright>
  406. <group>Development</group>
  407. <description>Maven Recipe: RPM Package.</description>
  408. <defaultDirmode>755</defaultDirmode>
  409. <defaultFilemode>644</defaultFilemode>
  410. <defaultUsername>root</defaultUsername>
  411. <defaultGroupname>root</defaultGroupname>
  412. <postinstallScriptlet>
  413. <scriptFile>${project.build.directory}/resources/rpm/sink/postinstall.sh</scriptFile>
  414. <fileEncoding>utf-8</fileEncoding>
  415. </postinstallScriptlet>
  416. <mappings>
  417. <mapping>
  418. <directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
  419. <sources>
  420. <source>
  421. <location>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</location>
  422. </source>
  423. </sources>
  424. </mapping>
  425. <mapping>
  426. <directory>/usr/lib/flume/lib</directory>
  427. <sources>
  428. <source>
  429. <location>${flume-sink.dir}/target/ambari-metrics-flume-sink-with-common-${project.version}.jar</location>
  430. </source>
  431. </sources>
  432. </mapping>
  433. <mapping>
  434. <directory>/usr/lib/storm/lib</directory>
  435. <sources>
  436. <source>
  437. <location>${storm-sink.dir}/target/ambari-metrics-storm-sink-with-common-${project.version}.jar</location>
  438. </source>
  439. </sources>
  440. </mapping>
  441. </mappings>
  442. </configuration>
  443. </execution>
  444. </executions>
  445. </plugin>
  446. </plugins>
  447. </build>
  448. </profile>
  449. <profile>
  450. <id>deb</id>
  451. <activation>
  452. <property>
  453. <name>build-deb</name>
  454. </property>
  455. </activation>
  456. <build>
  457. <plugins>
  458. <plugin>
  459. <artifactId>maven-resources-plugin</artifactId>
  460. <version>2.7</version>
  461. <executions>
  462. <execution>
  463. <id>copy-resources</id>
  464. <phase>prepare-package</phase>
  465. <goals>
  466. <goal>copy-resources</goal>
  467. </goals>
  468. <configuration>
  469. <outputDirectory>${project.build.directory}/resources/deb/control</outputDirectory>
  470. <resources>
  471. <resource>
  472. <directory>${project.basedir}/src/main/package/deb/control</directory>
  473. <excludes>
  474. <exclude>postinst</exclude>
  475. </excludes>
  476. <filtering>false</filtering>
  477. </resource>
  478. <resource>
  479. <directory>${project.basedir}/src/main/package/deb/control</directory>
  480. <includes>
  481. <include>postinst</include>
  482. </includes>
  483. <filtering>true</filtering>
  484. </resource>
  485. </resources>
  486. </configuration>
  487. </execution>
  488. </executions>
  489. </plugin>
  490. <plugin>
  491. <artifactId>jdeb</artifactId>
  492. <groupId>org.vafer</groupId>
  493. <version>1.0.1</version>
  494. <executions>
  495. <execution>
  496. <!-- unbinds rpm creation from maven lifecycle -->
  497. <phase>package</phase>
  498. <goals>
  499. <goal>jdeb</goal>
  500. </goals>
  501. </execution>
  502. </executions>
  503. <configuration>
  504. <controlDir>${project.build.directory}/resources/deb/control</controlDir>
  505. <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
  506. <dataSet>
  507. <data>
  508. <type>file</type>
  509. <src>${monitor.dir}/src/main/python/__init__.py</src>
  510. <mapper>
  511. <type>perm</type>
  512. <prefix>${resmonitor.install.dir}</prefix>
  513. <!-- TODO: Figure out if file perms should be set -->
  514. <!--user>root</user>
  515. <group>root</group-->
  516. <filemode>755</filemode>
  517. </mapper>
  518. </data>
  519. <data>
  520. <type>file</type>
  521. <src>${monitor.dir}/src/main/python/main.py</src>
  522. <mapper>
  523. <type>perm</type>
  524. <prefix>${resmonitor.install.dir}</prefix>
  525. <filemode>755</filemode>
  526. </mapper>
  527. </data>
  528. <data>
  529. <type>directory</type>
  530. <src>${monitor.dir}/src/main/python/core</src>
  531. <mapper>
  532. <type>perm</type>
  533. <prefix>${resmonitor.install.dir}/core</prefix>
  534. </mapper>
  535. </data>
  536. <data>
  537. <type>directory</type>
  538. <src>${monitor.dir}/src/main/python/psutil</src>
  539. <excludes>build/**</excludes>
  540. <mapper>
  541. <type>perm</type>
  542. <prefix>${resmonitor.install.dir}/psutil</prefix>
  543. </mapper>
  544. </data>
  545. <data>
  546. <type>template</type>
  547. <paths>
  548. <path>/var/run/ambari-metrics-monitor</path>
  549. <path>/var/log/ambari-metrics-monitor</path>
  550. <path>/etc/ambari-metrics-monitor/conf</path>
  551. <path>/usr/lib/ambari-metrics-collector</path>
  552. <path>/etc/ambari-metrics-collector/conf</path>
  553. <path>/etc/ams-hbase/conf</path>
  554. <path>/var/run/ambari-metrics-collector</path>
  555. <path>/var/run/ams-hbase</path>
  556. <path>/var/log/ambari-metrics-collector</path>
  557. <path>/var/lib/ambari-metrics-collector</path>
  558. <path>/usr/lib/ambari-metrics-hadoop-sink</path>
  559. <path>/usr/lib/flume/lib</path>
  560. <path>/usr/lib/storm/lib</path>
  561. </paths>
  562. </data>
  563. <data>
  564. <src>${monitor.dir}/conf/unix/metric_groups.conf</src>
  565. <type>file</type>
  566. <mapper>
  567. <type>perm</type>
  568. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  569. <filemode>644</filemode>
  570. </mapper>
  571. </data>
  572. <data>
  573. <src>${monitor.dir}/conf/unix/metric_monitor.ini</src>
  574. <type>file</type>
  575. <mapper>
  576. <type>perm</type>
  577. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  578. <filemode>644</filemode>
  579. </mapper>
  580. </data>
  581. <data>
  582. <src>${monitor.dir}/conf/unix/ambari-metrics-monitor</src>
  583. <type>file</type>
  584. <mapper>
  585. <type>perm</type>
  586. <prefix>/usr/sbin</prefix>
  587. <filemode>755</filemode>
  588. </mapper>
  589. </data>
  590. <!-- Metric collector -->
  591. <data>
  592. <src>${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar</src>
  593. <type>file</type>
  594. <mapper>
  595. <type>perm</type>
  596. <dirmode>644</dirmode>
  597. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  598. </mapper>
  599. </data>
  600. <data>
  601. <src>${collector.dir}/target/lib</src>
  602. <type>directory</type>
  603. <mapper>
  604. <type>perm</type>
  605. <filemode>644</filemode>
  606. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  607. </mapper>
  608. </data>
  609. <data>
  610. <src>${collector.dir}/target/embedded/${hbase.folder}</src>
  611. <type>directory</type>
  612. <excludes>bin/**,bin/*</excludes>
  613. <mapper>
  614. <type>perm</type>
  615. <prefix>/usr/lib/ams-hbase</prefix>
  616. <filemode>644</filemode>
  617. </mapper>
  618. </data>
  619. <data>
  620. <src>${collector.dir}/target/embedded/${hbase.folder}/bin</src>
  621. <type>directory</type>
  622. <mapper>
  623. <type>perm</type>
  624. <filemode>755</filemode>
  625. <prefix>/usr/lib/ams-hbase/bin</prefix>
  626. </mapper>
  627. </data>
  628. <data>
  629. <src>${collector.dir}/target/lib</src>
  630. <type>directory</type>
  631. <includes>phoenix*.jar,antlr*.jar</includes>
  632. <mapper>
  633. <type>perm</type>
  634. <filemode>644</filemode>
  635. <prefix>/usr/lib/ams-hbase/lib</prefix>
  636. </mapper>
  637. </data>
  638. <data>
  639. <src>${collector.dir}/conf/unix/ambari-metrics-collector</src>
  640. <type>file</type>
  641. <mapper>
  642. <type>perm</type>
  643. <filemode>755</filemode>
  644. <prefix>/usr/sbin</prefix>
  645. </mapper>
  646. </data>
  647. <data>
  648. <src>${collector.dir}/conf/unix/ams-env.sh</src>
  649. <type>file</type>
  650. <mapper>
  651. <type>perm</type>
  652. <filemode>755</filemode>
  653. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  654. </mapper>
  655. </data>
  656. <data>
  657. <src>${collector.dir}/conf/unix/ams-site.xml</src>
  658. <type>file</type>
  659. <mapper>
  660. <type>perm</type>
  661. <filemode>644</filemode>
  662. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  663. </mapper>
  664. </data>
  665. <data>
  666. <src>${collector.dir}/conf/unix/log4j.properties</src>
  667. <type>file</type>
  668. <mapper>
  669. <type>perm</type>
  670. <filemode>644</filemode>
  671. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  672. </mapper>
  673. </data>
  674. <data>
  675. <src>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</src>
  676. <type>file</type>
  677. <mapper>
  678. <type>perm</type>
  679. <filemode>644</filemode>
  680. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  681. </mapper>
  682. </data>
  683. <data>
  684. <type>directory</type>
  685. <src>${collector.dir}/target/embedded/${hbase.folder}/conf</src>
  686. <mapper>
  687. <type>perm</type>
  688. <dirmode>755</dirmode>
  689. <filemode>644</filemode>
  690. <prefix>/etc/ams-hbase/conf</prefix>
  691. </mapper>
  692. </data>
  693. <!-- hadoop sink -->
  694. <data>
  695. <src>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</src>
  696. <type>file</type>
  697. <mapper>
  698. <type>perm</type>
  699. <filemode>644</filemode>
  700. <dirmode>755</dirmode>
  701. <prefix>/usr/lib/ambari-metrics-hadoop-sink</prefix>
  702. </mapper>
  703. </data>
  704. <!-- flume sink -->
  705. <data>
  706. <src>${flume-sink.dir}/target/${flume.sink.jar}</src>
  707. <type>file</type>
  708. <mapper>
  709. <type>perm</type>
  710. <filemode>644</filemode>
  711. <dirmode>755</dirmode>
  712. <prefix>/usr/lib/flume/lib</prefix>
  713. </mapper>
  714. </data>
  715. <!-- storm sink -->
  716. <data>
  717. <src>${storm-sink.dir}/target/${storm.sink.jar}</src>
  718. <type>file</type>
  719. <mapper>
  720. <type>perm</type>
  721. <filemode>644</filemode>
  722. <dirmode>755</dirmode>
  723. <prefix>/usr/lib/storm/lib</prefix>
  724. </mapper>
  725. </data>
  726. </dataSet>
  727. </configuration>
  728. </plugin>
  729. </plugins>
  730. </build>
  731. </profile>
  732. <profile>
  733. <id>windows</id>
  734. <activation>
  735. <os>
  736. <family>win</family>
  737. </os>
  738. </activation>
  739. <properties>
  740. <envClassifier>win</envClassifier>
  741. <dirsep>\</dirsep>
  742. <pathsep>;</pathsep>
  743. <executable.python>python</executable.python>
  744. <executable.shell>cmd</executable.shell>
  745. <fileextension.shell>cmd</fileextension.shell>
  746. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  747. <assemblydescriptor.collector>src/main/assembly/collector-windows.xml</assemblydescriptor.collector>
  748. <assemblydescriptor.monitor>src/main/assembly/monitor-windows.xml</assemblydescriptor.monitor>
  749. <assemblydescriptor.sink>src/main/assembly/sink-windows.xml</assemblydescriptor.sink>
  750. <packagingFormat>jar</packagingFormat>
  751. <python.build.version>2.7</python.build.version>
  752. </properties>
  753. </profile>
  754. <profile>
  755. <id>linux</id>
  756. <activation>
  757. <os>
  758. <family>unix</family>
  759. </os>
  760. </activation>
  761. <properties>
  762. <envClassifier>linux</envClassifier>
  763. <dirsep>/</dirsep>
  764. <pathsep>:</pathsep>
  765. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  766. <executable.shell>sh</executable.shell>
  767. <fileextension.shell>sh</fileextension.shell>
  768. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  769. <assemblydescriptor.collector>src/main/assembly/collector.xml</assemblydescriptor.collector>
  770. <assemblydescriptor.monitor>src/main/assembly/monitor.xml</assemblydescriptor.monitor>
  771. <assemblydescriptor.sink>src/main/assembly/sink.xml</assemblydescriptor.sink>
  772. <packagingFormat>jar</packagingFormat>
  773. </properties>
  774. </profile>
  775. <profile>
  776. <id>msi</id>
  777. <activation>
  778. <os>
  779. <family>Windows</family>
  780. </os>
  781. </activation>
  782. <build>
  783. <plugins>
  784. <!-- msi creation -->
  785. <plugin>
  786. <groupId>org.codehaus.mojo</groupId>
  787. <artifactId>exec-maven-plugin</artifactId>
  788. <version>1.2</version>
  789. <executions>
  790. <execution>
  791. <id>run-heat-collector</id>
  792. <phase>package</phase>
  793. <goals>
  794. <goal>exec</goal>
  795. </goals>
  796. <configuration>
  797. <executable>heat.exe</executable>
  798. <arguments>
  799. <argument>dir</argument>
  800. <argument>"."</argument>
  801. <argument>-dr</argument>
  802. <argument>"COLLECTOR_INSTALL_DIRECTORY"</argument>
  803. <argument>-platform</argument>
  804. <argument>Win64</argument>
  805. <argument>-cg</argument>
  806. <argument>"AmbariMetricsCollectorGroup"</argument>
  807. <argument>-gg</argument>
  808. <argument>-ke</argument>
  809. <argument>-srd</argument>
  810. <argument>-o</argument>
  811. <argument>".\..\collector-files.wxs"</argument>
  812. </arguments>
  813. <workingDirectory>${basedir}/target/ambari-metrics-collector-${project.version}</workingDirectory>
  814. </configuration>
  815. </execution>
  816. <execution>
  817. <id>run-candle-collector</id>
  818. <phase>package</phase>
  819. <goals>
  820. <goal>exec</goal>
  821. </goals>
  822. <configuration>
  823. <executable>candle.exe</executable>
  824. <arguments>
  825. <argument>-arch</argument>
  826. <argument>x64</argument>
  827. <argument>collector.wxs</argument>
  828. <argument>collector-files.wxs</argument>
  829. </arguments>
  830. <workingDirectory>${basedir}/target</workingDirectory>
  831. </configuration>
  832. </execution>
  833. <execution>
  834. <id>run-light-collector</id>
  835. <phase>package</phase>
  836. <goals>
  837. <goal>exec</goal>
  838. </goals>
  839. <configuration>
  840. <executable>light.exe</executable>
  841. <arguments>
  842. <argument>-ext</argument>
  843. <argument>WixUIExtension</argument>
  844. <argument>-b</argument>
  845. <argument>${basedir}/target/ambari-metrics-collector-${project.version}</argument>
  846. <argument>-o</argument>
  847. <argument>ambari-metrics-collector-${project.version}.msi</argument>
  848. <argument>collector.wixobj</argument>
  849. <argument>collector-files.wixobj</argument>
  850. </arguments>
  851. <workingDirectory>${basedir}/target</workingDirectory>
  852. </configuration>
  853. </execution>
  854. <execution>
  855. <id>run-heat-monitor</id>
  856. <phase>package</phase>
  857. <goals>
  858. <goal>exec</goal>
  859. </goals>
  860. <configuration>
  861. <executable>heat.exe</executable>
  862. <arguments>
  863. <argument>dir</argument>
  864. <argument>"."</argument>
  865. <argument>-dr</argument>
  866. <argument>"MONITOR_INSTALL_DIRECTORY"</argument>
  867. <argument>-platform</argument>
  868. <argument>Win64</argument>
  869. <argument>-cg</argument>
  870. <argument>"AmbariMetricsMonitorGroup"</argument>
  871. <argument>-gg</argument>
  872. <argument>-ke</argument>
  873. <argument>-srd</argument>
  874. <argument>-o</argument>
  875. <argument>".\..\monitor-files.wxs"</argument>
  876. </arguments>
  877. <workingDirectory>${basedir}/target/ambari-metrics-monitor-${project.version}</workingDirectory>
  878. </configuration>
  879. </execution>
  880. <execution>
  881. <id>run-candle-monitor</id>
  882. <phase>package</phase>
  883. <goals>
  884. <goal>exec</goal>
  885. </goals>
  886. <configuration>
  887. <executable>candle.exe</executable>
  888. <arguments>
  889. <argument>-arch</argument>
  890. <argument>x64</argument>
  891. <argument>monitor.wxs</argument>
  892. <argument>monitor-files.wxs</argument>
  893. </arguments>
  894. <workingDirectory>${basedir}/target</workingDirectory>
  895. </configuration>
  896. </execution>
  897. <execution>
  898. <id>run-light-monitor</id>
  899. <phase>package</phase>
  900. <goals>
  901. <goal>exec</goal>
  902. </goals>
  903. <configuration>
  904. <executable>light.exe</executable>
  905. <arguments>
  906. <argument>-ext</argument>
  907. <argument>WixUIExtension</argument>
  908. <argument>-b</argument>
  909. <argument>${basedir}/target/ambari-metrics-monitor-${project.version}</argument>
  910. <argument>-o</argument>
  911. <argument>ambari-metrics-monitor-${project.version}.msi</argument>
  912. <argument>monitor.wixobj</argument>
  913. <argument>monitor-files.wixobj</argument>
  914. </arguments>
  915. <workingDirectory>${basedir}/target</workingDirectory>
  916. </configuration>
  917. </execution>
  918. <execution>
  919. <id>run-heat-sink</id>
  920. <phase>package</phase>
  921. <goals>
  922. <goal>exec</goal>
  923. </goals>
  924. <configuration>
  925. <executable>heat.exe</executable>
  926. <arguments>
  927. <argument>dir</argument>
  928. <argument>"."</argument>
  929. <argument>-dr</argument>
  930. <argument>"SINK_INSTALL_DIRECTORY"</argument>
  931. <argument>-platform</argument>
  932. <argument>Win64</argument>
  933. <argument>-cg</argument>
  934. <argument>"AmbariMetricsSinkGroup"</argument>
  935. <argument>-gg</argument>
  936. <argument>-ke</argument>
  937. <argument>-srd</argument>
  938. <argument>-o</argument>
  939. <argument>".\..\sink-files.wxs"</argument>
  940. </arguments>
  941. <workingDirectory>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</workingDirectory>
  942. </configuration>
  943. </execution>
  944. <execution>
  945. <id>run-candle-sink</id>
  946. <phase>package</phase>
  947. <goals>
  948. <goal>exec</goal>
  949. </goals>
  950. <configuration>
  951. <executable>candle.exe</executable>
  952. <arguments>
  953. <argument>-arch</argument>
  954. <argument>x64</argument>
  955. <argument>sink.wxs</argument>
  956. <argument>sink-files.wxs</argument>
  957. </arguments>
  958. <workingDirectory>${basedir}/target</workingDirectory>
  959. </configuration>
  960. </execution>
  961. <execution>
  962. <id>run-light-sink</id>
  963. <phase>package</phase>
  964. <goals>
  965. <goal>exec</goal>
  966. </goals>
  967. <configuration>
  968. <executable>light.exe</executable>
  969. <arguments>
  970. <argument>-ext</argument>
  971. <argument>WixUIExtension</argument>
  972. <argument>-b</argument>
  973. <argument>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</argument>
  974. <argument>-o</argument>
  975. <argument>ambari-metrics-hadoop-sink-${project.version}.msi</argument>
  976. <argument>sink.wixobj</argument>
  977. <argument>sink-files.wixobj</argument>
  978. </arguments>
  979. <workingDirectory>${basedir}/target</workingDirectory>
  980. </configuration>
  981. </execution>
  982. </executions>
  983. </plugin>
  984. </plugins>
  985. </build>
  986. </profile>
  987. </profiles>
  988. <dependencies>
  989. <dependency>
  990. <groupId>org.apache.ambari</groupId>
  991. <artifactId>ambari-metrics-timelineservice</artifactId>
  992. <version>${project.version}</version>
  993. </dependency>
  994. <dependency>
  995. <groupId>org.apache.ambari</groupId>
  996. <artifactId>ambari-metrics-common</artifactId>
  997. <version>${project.version}</version>
  998. </dependency>
  999. <dependency>
  1000. <groupId>org.apache.ambari</groupId>
  1001. <artifactId>ambari-metrics-hadoop-sink</artifactId>
  1002. <version>${project.version}</version>
  1003. </dependency>
  1004. <dependency>
  1005. <groupId>org.apache.ambari</groupId>
  1006. <artifactId>ambari-metrics-flume-sink</artifactId>
  1007. <version>${project.version}</version>
  1008. </dependency>
  1009. <dependency>
  1010. <groupId>org.apache.ambari</groupId>
  1011. <artifactId>ambari-metrics-storm-sink</artifactId>
  1012. <version>${project.version}</version>
  1013. </dependency>
  1014. <dependency>
  1015. <groupId>org.apache.ambari</groupId>
  1016. <artifactId>ambari-metrics-host-monitoring</artifactId>
  1017. <version>${project.version}</version>
  1018. <type>pom</type>
  1019. <optional>true</optional>
  1020. </dependency>
  1021. </dependencies>
  1022. </project>