pom.xml 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074
  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>${resmonitor.install.dir}/ambari_commons</directory>
  243. <sources>
  244. <source>
  245. <location>
  246. ${project.basedir}/../../ambari-common/src/main/python/ambari_commons
  247. </location>
  248. </source>
  249. </sources>
  250. </mapping>
  251. <mapping>
  252. <directory>/etc/ambari-metrics-monitor/conf</directory>
  253. <configuration>true</configuration>
  254. </mapping>
  255. <mapping>
  256. <directory>/var/run/ambari-metrics-monitor</directory>
  257. </mapping>
  258. <mapping>
  259. <directory>/var/log/ambari-metrics-monitor</directory>
  260. </mapping>
  261. <mapping>
  262. <directory>/usr/sbin</directory>
  263. <filemode>755</filemode>
  264. <username>root</username>
  265. <groupname>root</groupname>
  266. <directoryIncluded>false</directoryIncluded>
  267. <sources>
  268. <source>
  269. <location>
  270. ${monitor.dir}/conf/unix/ambari-metrics-monitor
  271. </location>
  272. <filter>true</filter>
  273. </source>
  274. </sources>
  275. </mapping>
  276. </mappings>
  277. </configuration>
  278. </execution>
  279. <!--ambari-metrics-collector-->
  280. <execution>
  281. <id>ambari-metrics-collector</id>
  282. <phase>package</phase>
  283. <goals>
  284. <goal>rpm</goal>
  285. </goals>
  286. <configuration>
  287. <name>ambari-metrics-collector</name>
  288. <copyright>2012, Apache Software Foundation</copyright>
  289. <group>Development</group>
  290. <description>Maven Recipe: RPM Package.</description>
  291. <autoRequires>false</autoRequires>
  292. <requires>
  293. <require>${python.ver}</require>
  294. </requires>
  295. <defaultFilemode>644</defaultFilemode>
  296. <defaultDirmode>755</defaultDirmode>
  297. <defaultUsername>root</defaultUsername>
  298. <defaultGroupname>root</defaultGroupname>
  299. <mappings>
  300. <mapping>
  301. <!--jars-->
  302. <directory>/usr/lib/ambari-metrics-collector/</directory>
  303. <sources>
  304. <source>
  305. <location>${collector.dir}/target/lib</location>
  306. </source>
  307. <source>
  308. <location>
  309. ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar
  310. </location>
  311. </source>
  312. </sources>
  313. </mapping>
  314. <mapping>
  315. <!--embedded applications-->
  316. <directory>/usr/lib/ams-hbase/</directory>
  317. <sources>
  318. <source>
  319. <location>${collector.dir}/target/embedded/${hbase.folder}</location>
  320. <excludes>
  321. <exclude>bin/**</exclude>
  322. <exclude>bin/*</exclude>
  323. </excludes>
  324. </source>
  325. </sources>
  326. </mapping>
  327. <mapping>
  328. <directory>/usr/lib/ams-hbase/bin</directory>
  329. <filemode>755</filemode>
  330. <sources>
  331. <source>
  332. <location>${collector.dir}/target/embedded/${hbase.folder}/bin</location>
  333. </source>
  334. </sources>
  335. </mapping>
  336. <mapping>
  337. <directory>/usr/lib/ams-hbase/lib/</directory>
  338. <sources>
  339. <source>
  340. <location>${collector.dir}/target/lib</location>
  341. <includes>
  342. <include>phoenix*.jar</include>
  343. <include>antlr*.jar</include>
  344. </includes>
  345. </source>
  346. </sources>
  347. </mapping>
  348. <mapping>
  349. <directory>/usr/sbin</directory>
  350. <filemode>755</filemode>
  351. <username>root</username>
  352. <groupname>root</groupname>
  353. <directoryIncluded>false</directoryIncluded>
  354. <sources>
  355. <source>
  356. <location>${collector.dir}/conf/unix/ambari-metrics-collector</location>
  357. <filter>false</filter>
  358. </source>
  359. </sources>
  360. </mapping>
  361. <mapping>
  362. <directory>/etc/ambari-metrics-collector/conf</directory>
  363. <configuration>true</configuration>
  364. <sources>
  365. <source>
  366. <location>${collector.dir}/conf/unix/ams-env.sh</location>
  367. </source>
  368. <source>
  369. <location>${collector.dir}/conf/unix/ams-site.xml</location>
  370. </source>
  371. <source>
  372. <location>${collector.dir}/conf/unix/log4j.properties</location>
  373. </source>
  374. <source>
  375. <location>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  376. </source>
  377. </sources>
  378. </mapping>
  379. <mapping>
  380. <directory>/etc/ams-hbase/conf</directory>
  381. <configuration>true</configuration>
  382. <sources>
  383. <source>
  384. <location>${collector.dir}/target/embedded/${hbase.folder}/conf</location>
  385. <includes>
  386. <include>*.*</include>
  387. </includes>
  388. </source>
  389. </sources>
  390. </mapping>
  391. <mapping>
  392. <directory>/var/run/ams-hbase</directory>
  393. </mapping>
  394. <mapping>
  395. <directory>/var/run/ambari-metrics-collector</directory>
  396. </mapping>
  397. <mapping>
  398. <directory>/var/log/ambari-metrics-collector</directory>
  399. </mapping>
  400. <mapping>
  401. <directory>/var/lib/ambari-metrics-collector</directory>
  402. </mapping>
  403. </mappings>
  404. </configuration>
  405. </execution>
  406. <!--hadoop-sink-->
  407. <execution>
  408. <id>ambari-metrics-hadoop-sink</id>
  409. <phase>package</phase>
  410. <goals>
  411. <goal>rpm</goal>
  412. </goals>
  413. <configuration>
  414. <name>ambari-metrics-hadoop-sink</name>
  415. <copyright>2012, Apache Software Foundation</copyright>
  416. <group>Development</group>
  417. <description>Maven Recipe: RPM Package.</description>
  418. <defaultDirmode>755</defaultDirmode>
  419. <defaultFilemode>644</defaultFilemode>
  420. <defaultUsername>root</defaultUsername>
  421. <defaultGroupname>root</defaultGroupname>
  422. <postinstallScriptlet>
  423. <scriptFile>${project.build.directory}/resources/rpm/sink/postinstall.sh</scriptFile>
  424. <fileEncoding>utf-8</fileEncoding>
  425. </postinstallScriptlet>
  426. <mappings>
  427. <mapping>
  428. <directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
  429. <sources>
  430. <source>
  431. <location>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</location>
  432. </source>
  433. </sources>
  434. </mapping>
  435. <mapping>
  436. <directory>/usr/lib/flume/lib</directory>
  437. <sources>
  438. <source>
  439. <location>${flume-sink.dir}/target/ambari-metrics-flume-sink-with-common-${project.version}.jar</location>
  440. </source>
  441. </sources>
  442. </mapping>
  443. <mapping>
  444. <directory>/usr/lib/storm/lib</directory>
  445. <sources>
  446. <source>
  447. <location>${storm-sink.dir}/target/ambari-metrics-storm-sink-with-common-${project.version}.jar</location>
  448. </source>
  449. </sources>
  450. </mapping>
  451. </mappings>
  452. </configuration>
  453. </execution>
  454. </executions>
  455. </plugin>
  456. </plugins>
  457. </build>
  458. </profile>
  459. <profile>
  460. <id>deb</id>
  461. <activation>
  462. <property>
  463. <name>build-deb</name>
  464. </property>
  465. </activation>
  466. <build>
  467. <plugins>
  468. <plugin>
  469. <artifactId>maven-resources-plugin</artifactId>
  470. <version>2.7</version>
  471. <executions>
  472. <execution>
  473. <id>copy-resources</id>
  474. <phase>prepare-package</phase>
  475. <goals>
  476. <goal>copy-resources</goal>
  477. </goals>
  478. <configuration>
  479. <outputDirectory>${project.build.directory}/resources/deb/control</outputDirectory>
  480. <resources>
  481. <resource>
  482. <directory>${project.basedir}/src/main/package/deb/control</directory>
  483. <excludes>
  484. <exclude>postinst</exclude>
  485. </excludes>
  486. <filtering>false</filtering>
  487. </resource>
  488. <resource>
  489. <directory>${project.basedir}/src/main/package/deb/control</directory>
  490. <includes>
  491. <include>postinst</include>
  492. </includes>
  493. <filtering>true</filtering>
  494. </resource>
  495. </resources>
  496. </configuration>
  497. </execution>
  498. </executions>
  499. </plugin>
  500. <plugin>
  501. <artifactId>jdeb</artifactId>
  502. <groupId>org.vafer</groupId>
  503. <version>1.0.1</version>
  504. <executions>
  505. <execution>
  506. <phase>package</phase>
  507. <goals>
  508. <goal>jdeb</goal>
  509. </goals>
  510. </execution>
  511. </executions>
  512. <configuration>
  513. <controlDir>${project.build.directory}/resources/deb/control</controlDir>
  514. <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
  515. <dataSet>
  516. <data>
  517. <type>file</type>
  518. <src>${monitor.dir}/src/main/python/__init__.py</src>
  519. <mapper>
  520. <type>perm</type>
  521. <prefix>${resmonitor.install.dir}</prefix>
  522. <!-- TODO: Figure out if file perms should be set -->
  523. <!--user>root</user>
  524. <group>root</group-->
  525. <filemode>755</filemode>
  526. </mapper>
  527. </data>
  528. <data>
  529. <type>file</type>
  530. <src>${monitor.dir}/src/main/python/main.py</src>
  531. <mapper>
  532. <type>perm</type>
  533. <prefix>${resmonitor.install.dir}</prefix>
  534. <filemode>755</filemode>
  535. </mapper>
  536. </data>
  537. <data>
  538. <type>directory</type>
  539. <src>${monitor.dir}/src/main/python/core</src>
  540. <mapper>
  541. <type>perm</type>
  542. <prefix>${resmonitor.install.dir}/core</prefix>
  543. </mapper>
  544. </data>
  545. <data>
  546. <type>directory</type>
  547. <src>${monitor.dir}/src/main/python/psutil</src>
  548. <excludes>build/**</excludes>
  549. <mapper>
  550. <type>perm</type>
  551. <prefix>${resmonitor.install.dir}/psutil</prefix>
  552. </mapper>
  553. </data>
  554. <data>
  555. <type>directory</type>
  556. <src>${project.basedir}/../../ambari-common/src/main/python/ambari_commons</src>
  557. <mapper>
  558. <type>perm</type>
  559. <prefix>${resmonitor.install.dir}/ambari_commons</prefix>
  560. </mapper>
  561. </data>
  562. <data>
  563. <type>template</type>
  564. <paths>
  565. <path>/var/run/ambari-metrics-monitor</path>
  566. <path>/var/log/ambari-metrics-monitor</path>
  567. <path>/etc/ambari-metrics-monitor/conf</path>
  568. <path>/usr/lib/ambari-metrics-collector</path>
  569. <path>/etc/ambari-metrics-collector/conf</path>
  570. <path>/etc/ams-hbase/conf</path>
  571. <path>/var/run/ambari-metrics-collector</path>
  572. <path>/var/run/ams-hbase</path>
  573. <path>/var/log/ambari-metrics-collector</path>
  574. <path>/var/lib/ambari-metrics-collector</path>
  575. <path>/usr/lib/ambari-metrics-hadoop-sink</path>
  576. <path>/usr/lib/flume/lib</path>
  577. <path>/usr/lib/storm/lib</path>
  578. </paths>
  579. </data>
  580. <data>
  581. <src>${monitor.dir}/conf/unix/metric_groups.conf</src>
  582. <type>file</type>
  583. <mapper>
  584. <type>perm</type>
  585. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  586. <filemode>644</filemode>
  587. </mapper>
  588. </data>
  589. <data>
  590. <src>${monitor.dir}/conf/unix/metric_monitor.ini</src>
  591. <type>file</type>
  592. <mapper>
  593. <type>perm</type>
  594. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  595. <filemode>644</filemode>
  596. </mapper>
  597. </data>
  598. <data>
  599. <src>${monitor.dir}/conf/unix/ambari-metrics-monitor</src>
  600. <type>file</type>
  601. <mapper>
  602. <type>perm</type>
  603. <prefix>/usr/sbin</prefix>
  604. <filemode>755</filemode>
  605. </mapper>
  606. </data>
  607. <!-- Metric collector -->
  608. <data>
  609. <src>${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar</src>
  610. <type>file</type>
  611. <mapper>
  612. <type>perm</type>
  613. <dirmode>644</dirmode>
  614. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  615. </mapper>
  616. </data>
  617. <data>
  618. <src>${collector.dir}/target/lib</src>
  619. <type>directory</type>
  620. <mapper>
  621. <type>perm</type>
  622. <filemode>644</filemode>
  623. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  624. </mapper>
  625. </data>
  626. <data>
  627. <src>${collector.dir}/target/embedded/${hbase.folder}</src>
  628. <type>directory</type>
  629. <excludes>bin/**,bin/*</excludes>
  630. <mapper>
  631. <type>perm</type>
  632. <prefix>/usr/lib/ams-hbase</prefix>
  633. <filemode>644</filemode>
  634. </mapper>
  635. </data>
  636. <data>
  637. <src>${collector.dir}/target/embedded/${hbase.folder}/bin</src>
  638. <type>directory</type>
  639. <mapper>
  640. <type>perm</type>
  641. <filemode>755</filemode>
  642. <prefix>/usr/lib/ams-hbase/bin</prefix>
  643. </mapper>
  644. </data>
  645. <data>
  646. <src>${collector.dir}/target/lib</src>
  647. <type>directory</type>
  648. <includes>phoenix*.jar,antlr*.jar</includes>
  649. <mapper>
  650. <type>perm</type>
  651. <filemode>644</filemode>
  652. <prefix>/usr/lib/ams-hbase/lib</prefix>
  653. </mapper>
  654. </data>
  655. <data>
  656. <src>${collector.dir}/conf/unix/ambari-metrics-collector</src>
  657. <type>file</type>
  658. <mapper>
  659. <type>perm</type>
  660. <filemode>755</filemode>
  661. <prefix>/usr/sbin</prefix>
  662. </mapper>
  663. </data>
  664. <data>
  665. <src>${collector.dir}/conf/unix/ams-env.sh</src>
  666. <type>file</type>
  667. <mapper>
  668. <type>perm</type>
  669. <filemode>755</filemode>
  670. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  671. </mapper>
  672. </data>
  673. <data>
  674. <src>${collector.dir}/conf/unix/ams-site.xml</src>
  675. <type>file</type>
  676. <mapper>
  677. <type>perm</type>
  678. <filemode>644</filemode>
  679. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  680. </mapper>
  681. </data>
  682. <data>
  683. <src>${collector.dir}/conf/unix/log4j.properties</src>
  684. <type>file</type>
  685. <mapper>
  686. <type>perm</type>
  687. <filemode>644</filemode>
  688. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  689. </mapper>
  690. </data>
  691. <data>
  692. <src>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</src>
  693. <type>file</type>
  694. <mapper>
  695. <type>perm</type>
  696. <filemode>644</filemode>
  697. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  698. </mapper>
  699. </data>
  700. <data>
  701. <type>directory</type>
  702. <src>${collector.dir}/target/embedded/${hbase.folder}/conf</src>
  703. <mapper>
  704. <type>perm</type>
  705. <dirmode>755</dirmode>
  706. <filemode>644</filemode>
  707. <prefix>/etc/ams-hbase/conf</prefix>
  708. </mapper>
  709. </data>
  710. <!-- hadoop sink -->
  711. <data>
  712. <src>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</src>
  713. <type>file</type>
  714. <mapper>
  715. <type>perm</type>
  716. <filemode>644</filemode>
  717. <dirmode>755</dirmode>
  718. <prefix>/usr/lib/ambari-metrics-hadoop-sink</prefix>
  719. </mapper>
  720. </data>
  721. <!-- flume sink -->
  722. <data>
  723. <src>${flume-sink.dir}/target/${flume.sink.jar}</src>
  724. <type>file</type>
  725. <mapper>
  726. <type>perm</type>
  727. <filemode>644</filemode>
  728. <dirmode>755</dirmode>
  729. <prefix>/usr/lib/flume/lib</prefix>
  730. </mapper>
  731. </data>
  732. <!-- storm sink -->
  733. <data>
  734. <src>${storm-sink.dir}/target/${storm.sink.jar}</src>
  735. <type>file</type>
  736. <mapper>
  737. <type>perm</type>
  738. <filemode>644</filemode>
  739. <dirmode>755</dirmode>
  740. <prefix>/usr/lib/storm/lib</prefix>
  741. </mapper>
  742. </data>
  743. </dataSet>
  744. </configuration>
  745. </plugin>
  746. </plugins>
  747. </build>
  748. </profile>
  749. <profile>
  750. <id>windows</id>
  751. <activation>
  752. <os>
  753. <family>win</family>
  754. </os>
  755. </activation>
  756. <properties>
  757. <envClassifier>win</envClassifier>
  758. <dirsep>\</dirsep>
  759. <pathsep>;</pathsep>
  760. <executable.python>python</executable.python>
  761. <executable.shell>cmd</executable.shell>
  762. <fileextension.shell>cmd</fileextension.shell>
  763. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  764. <assemblydescriptor.collector>src/main/assembly/collector-windows.xml</assemblydescriptor.collector>
  765. <assemblydescriptor.monitor>src/main/assembly/monitor-windows.xml</assemblydescriptor.monitor>
  766. <assemblydescriptor.sink>src/main/assembly/sink-windows.xml</assemblydescriptor.sink>
  767. <packagingFormat>jar</packagingFormat>
  768. <python.build.version>2.7</python.build.version>
  769. </properties>
  770. </profile>
  771. <profile>
  772. <id>linux</id>
  773. <activation>
  774. <os>
  775. <family>unix</family>
  776. </os>
  777. </activation>
  778. <properties>
  779. <envClassifier>linux</envClassifier>
  780. <dirsep>/</dirsep>
  781. <pathsep>:</pathsep>
  782. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  783. <executable.shell>sh</executable.shell>
  784. <fileextension.shell>sh</fileextension.shell>
  785. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  786. <assemblydescriptor.collector>src/main/assembly/collector.xml</assemblydescriptor.collector>
  787. <assemblydescriptor.monitor>src/main/assembly/monitor.xml</assemblydescriptor.monitor>
  788. <assemblydescriptor.sink>src/main/assembly/sink.xml</assemblydescriptor.sink>
  789. <packagingFormat>jar</packagingFormat>
  790. </properties>
  791. </profile>
  792. <profile>
  793. <id>msi</id>
  794. <activation>
  795. <os>
  796. <family>Windows</family>
  797. </os>
  798. </activation>
  799. <build>
  800. <plugins>
  801. <!-- msi creation -->
  802. <plugin>
  803. <groupId>org.codehaus.mojo</groupId>
  804. <artifactId>exec-maven-plugin</artifactId>
  805. <version>1.2</version>
  806. <executions>
  807. <execution>
  808. <id>run-heat-collector</id>
  809. <phase>package</phase>
  810. <goals>
  811. <goal>exec</goal>
  812. </goals>
  813. <configuration>
  814. <executable>heat.exe</executable>
  815. <arguments>
  816. <argument>dir</argument>
  817. <argument>"."</argument>
  818. <argument>-dr</argument>
  819. <argument>"COLLECTOR_INSTALL_DIRECTORY"</argument>
  820. <argument>-platform</argument>
  821. <argument>Win64</argument>
  822. <argument>-cg</argument>
  823. <argument>"AmbariMetricsCollectorGroup"</argument>
  824. <argument>-gg</argument>
  825. <argument>-ke</argument>
  826. <argument>-srd</argument>
  827. <argument>-o</argument>
  828. <argument>".\..\collector-files.wxs"</argument>
  829. </arguments>
  830. <workingDirectory>${basedir}/target/ambari-metrics-collector-${project.version}</workingDirectory>
  831. </configuration>
  832. </execution>
  833. <execution>
  834. <id>run-candle-collector</id>
  835. <phase>package</phase>
  836. <goals>
  837. <goal>exec</goal>
  838. </goals>
  839. <configuration>
  840. <executable>candle.exe</executable>
  841. <arguments>
  842. <argument>-arch</argument>
  843. <argument>x64</argument>
  844. <argument>collector.wxs</argument>
  845. <argument>collector-files.wxs</argument>
  846. </arguments>
  847. <workingDirectory>${basedir}/target</workingDirectory>
  848. </configuration>
  849. </execution>
  850. <execution>
  851. <id>run-light-collector</id>
  852. <phase>package</phase>
  853. <goals>
  854. <goal>exec</goal>
  855. </goals>
  856. <configuration>
  857. <executable>light.exe</executable>
  858. <arguments>
  859. <argument>-ext</argument>
  860. <argument>WixUIExtension</argument>
  861. <argument>-b</argument>
  862. <argument>${basedir}/target/ambari-metrics-collector-${project.version}</argument>
  863. <argument>-o</argument>
  864. <argument>ambari-metrics-collector-${project.version}.msi</argument>
  865. <argument>collector.wixobj</argument>
  866. <argument>collector-files.wixobj</argument>
  867. </arguments>
  868. <workingDirectory>${basedir}/target</workingDirectory>
  869. </configuration>
  870. </execution>
  871. <execution>
  872. <id>run-heat-monitor</id>
  873. <phase>package</phase>
  874. <goals>
  875. <goal>exec</goal>
  876. </goals>
  877. <configuration>
  878. <executable>heat.exe</executable>
  879. <arguments>
  880. <argument>dir</argument>
  881. <argument>"."</argument>
  882. <argument>-dr</argument>
  883. <argument>"MONITOR_INSTALL_DIRECTORY"</argument>
  884. <argument>-platform</argument>
  885. <argument>Win64</argument>
  886. <argument>-cg</argument>
  887. <argument>"AmbariMetricsMonitorGroup"</argument>
  888. <argument>-gg</argument>
  889. <argument>-ke</argument>
  890. <argument>-srd</argument>
  891. <argument>-o</argument>
  892. <argument>".\..\monitor-files.wxs"</argument>
  893. </arguments>
  894. <workingDirectory>${basedir}/target/ambari-metrics-monitor-${project.version}</workingDirectory>
  895. </configuration>
  896. </execution>
  897. <execution>
  898. <id>run-candle-monitor</id>
  899. <phase>package</phase>
  900. <goals>
  901. <goal>exec</goal>
  902. </goals>
  903. <configuration>
  904. <executable>candle.exe</executable>
  905. <arguments>
  906. <argument>-arch</argument>
  907. <argument>x64</argument>
  908. <argument>monitor.wxs</argument>
  909. <argument>monitor-files.wxs</argument>
  910. </arguments>
  911. <workingDirectory>${basedir}/target</workingDirectory>
  912. </configuration>
  913. </execution>
  914. <execution>
  915. <id>run-light-monitor</id>
  916. <phase>package</phase>
  917. <goals>
  918. <goal>exec</goal>
  919. </goals>
  920. <configuration>
  921. <executable>light.exe</executable>
  922. <arguments>
  923. <argument>-ext</argument>
  924. <argument>WixUIExtension</argument>
  925. <argument>-b</argument>
  926. <argument>${basedir}/target/ambari-metrics-monitor-${project.version}</argument>
  927. <argument>-o</argument>
  928. <argument>ambari-metrics-monitor-${project.version}.msi</argument>
  929. <argument>monitor.wixobj</argument>
  930. <argument>monitor-files.wixobj</argument>
  931. </arguments>
  932. <workingDirectory>${basedir}/target</workingDirectory>
  933. </configuration>
  934. </execution>
  935. <execution>
  936. <id>run-heat-sink</id>
  937. <phase>package</phase>
  938. <goals>
  939. <goal>exec</goal>
  940. </goals>
  941. <configuration>
  942. <executable>heat.exe</executable>
  943. <arguments>
  944. <argument>dir</argument>
  945. <argument>"."</argument>
  946. <argument>-dr</argument>
  947. <argument>"SINK_INSTALL_DIRECTORY"</argument>
  948. <argument>-platform</argument>
  949. <argument>Win64</argument>
  950. <argument>-cg</argument>
  951. <argument>"AmbariMetricsSinkGroup"</argument>
  952. <argument>-gg</argument>
  953. <argument>-ke</argument>
  954. <argument>-srd</argument>
  955. <argument>-o</argument>
  956. <argument>".\..\sink-files.wxs"</argument>
  957. </arguments>
  958. <workingDirectory>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</workingDirectory>
  959. </configuration>
  960. </execution>
  961. <execution>
  962. <id>run-candle-sink</id>
  963. <phase>package</phase>
  964. <goals>
  965. <goal>exec</goal>
  966. </goals>
  967. <configuration>
  968. <executable>candle.exe</executable>
  969. <arguments>
  970. <argument>-arch</argument>
  971. <argument>x64</argument>
  972. <argument>sink.wxs</argument>
  973. <argument>sink-files.wxs</argument>
  974. </arguments>
  975. <workingDirectory>${basedir}/target</workingDirectory>
  976. </configuration>
  977. </execution>
  978. <execution>
  979. <id>run-light-sink</id>
  980. <phase>package</phase>
  981. <goals>
  982. <goal>exec</goal>
  983. </goals>
  984. <configuration>
  985. <executable>light.exe</executable>
  986. <arguments>
  987. <argument>-ext</argument>
  988. <argument>WixUIExtension</argument>
  989. <argument>-b</argument>
  990. <argument>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</argument>
  991. <argument>-o</argument>
  992. <argument>ambari-metrics-hadoop-sink-${project.version}.msi</argument>
  993. <argument>sink.wixobj</argument>
  994. <argument>sink-files.wixobj</argument>
  995. </arguments>
  996. <workingDirectory>${basedir}/target</workingDirectory>
  997. </configuration>
  998. </execution>
  999. </executions>
  1000. </plugin>
  1001. </plugins>
  1002. </build>
  1003. </profile>
  1004. </profiles>
  1005. <dependencies>
  1006. <dependency>
  1007. <groupId>org.apache.ambari</groupId>
  1008. <artifactId>ambari-metrics-timelineservice</artifactId>
  1009. <version>${project.version}</version>
  1010. </dependency>
  1011. <dependency>
  1012. <groupId>org.apache.ambari</groupId>
  1013. <artifactId>ambari-metrics-common</artifactId>
  1014. <version>${project.version}</version>
  1015. </dependency>
  1016. <dependency>
  1017. <groupId>org.apache.ambari</groupId>
  1018. <artifactId>ambari-metrics-hadoop-sink</artifactId>
  1019. <version>${project.version}</version>
  1020. </dependency>
  1021. <dependency>
  1022. <groupId>org.apache.ambari</groupId>
  1023. <artifactId>ambari-metrics-flume-sink</artifactId>
  1024. <version>${project.version}</version>
  1025. </dependency>
  1026. <dependency>
  1027. <groupId>org.apache.ambari</groupId>
  1028. <artifactId>ambari-metrics-storm-sink</artifactId>
  1029. <version>${project.version}</version>
  1030. </dependency>
  1031. <dependency>
  1032. <groupId>org.apache.ambari</groupId>
  1033. <artifactId>ambari-metrics-host-monitoring</artifactId>
  1034. <version>${project.version}</version>
  1035. <type>pom</type>
  1036. <optional>true</optional>
  1037. </dependency>
  1038. </dependencies>
  1039. </project>