pom.xml 40 KB

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