pom.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <project xmlns="http://maven.apache.org/POM/4.0.0"
  17. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  18. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  19. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  20. <parent>
  21. <artifactId>ambari-metrics</artifactId>
  22. <groupId>org.apache.ambari</groupId>
  23. <version>2.5.0.0.0</version>
  24. </parent>
  25. <modelVersion>4.0.0</modelVersion>
  26. <artifactId>ambari-metrics-timelineservice</artifactId>
  27. <version>2.5.0.0.0</version>
  28. <name>Ambari Metrics Collector</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <!-- Needed for generating FindBugs warnings using parent pom -->
  32. <!--<yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>-->
  33. <protobuf.version>2.5.0</protobuf.version>
  34. <hadoop.version>2.7.2</hadoop.version>
  35. <phoenix.version>4.8.1-HBase-1.2</phoenix.version>
  36. <hbase.version>1.2.4</hbase.version>
  37. </properties>
  38. <build>
  39. <plugins>
  40. <plugin>
  41. <groupId>org.codehaus.mojo</groupId>
  42. <artifactId>build-helper-maven-plugin</artifactId>
  43. <version>1.8</version>
  44. <executions>
  45. <execution>
  46. <id>parse-version</id>
  47. <phase>validate</phase>
  48. <goals>
  49. <goal>parse-version</goal>
  50. </goals>
  51. </execution>
  52. <execution>
  53. <id>regex-property</id>
  54. <goals>
  55. <goal>regex-property</goal>
  56. </goals>
  57. <configuration>
  58. <name>ambariVersion</name>
  59. <value>${project.version}</value>
  60. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  61. <replacement>$1.$2.$3.$4</replacement>
  62. <failIfNoMatch>false</failIfNoMatch>
  63. </configuration>
  64. </execution>
  65. </executions>
  66. </plugin>
  67. <plugin>
  68. <artifactId>maven-dependency-plugin</artifactId>
  69. <executions>
  70. <execution>
  71. <phase>package</phase>
  72. <goals>
  73. <goal>copy-dependencies</goal>
  74. </goals>
  75. <configuration>
  76. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  77. <includeScope>compile</includeScope>
  78. <excludeScope>test</excludeScope>
  79. <excludeArtifactIds>jasper-runtime,jasper-compiler</excludeArtifactIds>
  80. </configuration>
  81. </execution>
  82. </executions>
  83. </plugin>
  84. <plugin>
  85. <artifactId>maven-compiler-plugin</artifactId>
  86. <version>3.0</version>
  87. </plugin>
  88. <plugin>
  89. <groupId>org.codehaus.mojo</groupId>
  90. <artifactId>rpm-maven-plugin</artifactId>
  91. <version>2.0.1</version>
  92. <executions>
  93. <execution>
  94. <!-- unbinds rpm creation from maven lifecycle -->
  95. <phase>none</phase>
  96. <goals>
  97. <goal>rpm</goal>
  98. </goals>
  99. </execution>
  100. </executions>
  101. <configuration>
  102. <name>ambari-metrics-collector</name>
  103. <copyright>2012, Apache Software Foundation</copyright>
  104. <group>Development</group>
  105. <description>Maven Recipe: RPM Package.</description>
  106. <autoRequires>false</autoRequires>
  107. <requires>
  108. <require>${python.ver}</require>
  109. </requires>
  110. <defaultFilemode>644</defaultFilemode>
  111. <defaultDirmode>755</defaultDirmode>
  112. <defaultUsername>root</defaultUsername>
  113. <defaultGroupname>root</defaultGroupname>
  114. <mappings>
  115. <mapping>
  116. <!--jars-->
  117. <directory>/usr/lib/ambari-metrics-collector/</directory>
  118. <sources>
  119. <source>
  120. <location>target/lib</location>
  121. <excludes>
  122. <exclude>*tests.jar</exclude>
  123. </excludes>
  124. </source>
  125. <source>
  126. <location>${project.build.directory}/${project.artifactId}-${project.version}.jar</location>
  127. </source>
  128. </sources>
  129. </mapping>
  130. <mapping>
  131. <!--embedded applications-->
  132. <directory>/usr/lib/ams-hbase/</directory>
  133. <sources>
  134. <source>
  135. <location>target/embedded/${hbase.folder}</location>
  136. <excludes>
  137. <exclude>bin/**</exclude>
  138. <exclude>bin/*</exclude>
  139. <exclude>lib/*tests.jar</exclude>
  140. </excludes>
  141. </source>
  142. </sources>
  143. </mapping>
  144. <mapping>
  145. <directory>/usr/lib/ams-hbase/bin</directory>
  146. <filemode>755</filemode>
  147. <sources>
  148. <source>
  149. <location>target/embedded/${hbase.folder}/bin</location>
  150. </source>
  151. </sources>
  152. </mapping>
  153. <mapping>
  154. <directory>/usr/lib/ams-hbase/lib/</directory>
  155. <sources>
  156. <source>
  157. <location>target/lib</location>
  158. <includes>
  159. <include>phoenix*.jar</include>
  160. <include>antlr*.jar</include>
  161. </includes>
  162. </source>
  163. </sources>
  164. </mapping>
  165. <mapping>
  166. <directory>/usr/sbin</directory>
  167. <filemode>755</filemode>
  168. <username>root</username>
  169. <groupname>root</groupname>
  170. <directoryIncluded>false</directoryIncluded>
  171. <sources>
  172. <source>
  173. <location>conf/unix/ambari-metrics-collector</location>
  174. <filter>false</filter>
  175. </source>
  176. </sources>
  177. </mapping>
  178. <mapping>
  179. <directory>/usr/lib/ambari-metrics-collector/bin</directory>
  180. <filemode>755</filemode>
  181. <username>root</username>
  182. <groupname>root</groupname>
  183. <directoryIncluded>false</directoryIncluded>
  184. <sources>
  185. <source>
  186. <location>conf/unix/sqlline</location>
  187. <filter>false</filter>
  188. </source>
  189. </sources>
  190. </mapping>
  191. <mapping>
  192. <directory>/etc/ambari-metrics-collector/conf</directory>
  193. <configuration>true</configuration>
  194. <sources>
  195. <source>
  196. <location>conf/unix/ams-env.sh</location>
  197. </source>
  198. <source>
  199. <location>conf/unix/ams-site.xml</location>
  200. </source>
  201. <source>
  202. <location>conf/unix/log4j.properties</location>
  203. </source>
  204. <source>
  205. <location>target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  206. </source>
  207. </sources>
  208. </mapping>
  209. <mapping>
  210. <directory>/etc/ams-hbase/conf</directory>
  211. <configuration>true</configuration>
  212. <sources>
  213. <source>
  214. <location>target/embedded/${hbase.folder}/conf</location>
  215. <includes>
  216. <include>*.*</include>
  217. </includes>
  218. </source>
  219. </sources>
  220. </mapping>
  221. <mapping>
  222. <directory>/var/run/ams-hbase</directory>
  223. </mapping>
  224. <mapping>
  225. <directory>/var/lib/ambari-metrics-collector</directory>
  226. </mapping>
  227. </mappings>
  228. </configuration>
  229. </plugin>
  230. <plugin>
  231. <artifactId>maven-surefire-plugin</artifactId>
  232. <configuration>
  233. <redirectTestOutputToFile>true</redirectTestOutputToFile>
  234. <forkMode>always</forkMode>
  235. <argLine>-XX:-UseSplitVerifier</argLine>
  236. <!-- Each profile in the top-level pom.xml defines which test group categories to run. -->
  237. <groups>${testcase.groups}</groups>
  238. </configuration>
  239. </plugin>
  240. <plugin>
  241. <groupId>org.vafer</groupId>
  242. <artifactId>jdeb</artifactId>
  243. <version>1.0.1</version>
  244. <executions>
  245. <execution>
  246. <!--Stub execution on direct plugin call - workaround for ambari deb build process-->
  247. <id>stub-execution</id>
  248. <phase>none</phase>
  249. <goals>
  250. <goal>jdeb</goal>
  251. </goals>
  252. </execution>
  253. </executions>
  254. <configuration>
  255. <skip>true</skip>
  256. <attach>false</attach>
  257. <submodules>false</submodules>
  258. <controlDir>${project.basedir}/../src/main/package/deb/control</controlDir>
  259. </configuration>
  260. </plugin>
  261. </plugins>
  262. </build>
  263. <dependencies>
  264. <dependency>
  265. <groupId>org.apache.helix</groupId>
  266. <artifactId>helix-core</artifactId>
  267. <version>0.7.1</version>
  268. <exclusions>
  269. <exclusion>
  270. <artifactId>zookeeper</artifactId>
  271. <groupId>org.apache.zookeeper</groupId>
  272. </exclusion>
  273. </exclusions>
  274. </dependency>
  275. <dependency>
  276. <artifactId>zookeeper</artifactId>
  277. <groupId>org.apache.zookeeper</groupId>
  278. <version>3.4.8</version>
  279. </dependency>
  280. <dependency>
  281. <groupId>org.apache.phoenix</groupId>
  282. <artifactId>phoenix-core</artifactId>
  283. <version>${phoenix.version}</version>
  284. <exclusions>
  285. <exclusion>
  286. <groupId>org.apache.hadoop</groupId>
  287. <artifactId>hadoop-common</artifactId>
  288. </exclusion>
  289. <exclusion>
  290. <groupId>org.apache.hadoop</groupId>
  291. <artifactId>hadoop-annotations</artifactId>
  292. </exclusion>
  293. </exclusions>
  294. </dependency>
  295. <dependency>
  296. <groupId>org.apache.commons</groupId>
  297. <artifactId>commons-lang3</artifactId>
  298. <version>3.0</version>
  299. </dependency>
  300. <dependency>
  301. <groupId>org.apache.ambari</groupId>
  302. <artifactId>ambari-metrics-common</artifactId>
  303. <version>2.5.0.0.0</version>
  304. </dependency>
  305. <dependency>
  306. <groupId>javax.servlet</groupId>
  307. <artifactId>servlet-api</artifactId>
  308. <version>2.5</version>
  309. </dependency>
  310. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  311. <dependency>
  312. <groupId>org.apache.hadoop</groupId>
  313. <artifactId>hadoop-common</artifactId>
  314. <version>${hadoop.version}</version>
  315. <scope>provided</scope>
  316. <exclusions>
  317. <exclusion>
  318. <groupId>commons-el</groupId>
  319. <artifactId>commons-el</artifactId>
  320. </exclusion>
  321. <exclusion>
  322. <groupId>tomcat</groupId>
  323. <artifactId>jasper-runtime</artifactId>
  324. </exclusion>
  325. <exclusion>
  326. <groupId>tomcat</groupId>
  327. <artifactId>jasper-compiler</artifactId>
  328. </exclusion>
  329. <exclusion>
  330. <groupId>org.mortbay.jetty</groupId>
  331. <artifactId>jsp-2.1-jetty</artifactId>
  332. </exclusion>
  333. </exclusions>
  334. </dependency>
  335. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  336. <dependency>
  337. <groupId>org.apache.hadoop</groupId>
  338. <artifactId>hadoop-annotations</artifactId>
  339. <version>${hadoop.version}</version>
  340. </dependency>
  341. <dependency>
  342. <groupId>org.mockito</groupId>
  343. <artifactId>mockito-all</artifactId>
  344. <scope>test</scope>
  345. </dependency>
  346. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  347. <dependency>
  348. <groupId>org.apache.hadoop</groupId>
  349. <artifactId>hadoop-common</artifactId>
  350. <version>${hadoop.version}</version>
  351. <type>test-jar</type>
  352. <scope>test</scope>
  353. </dependency>
  354. <dependency>
  355. <groupId>com.google.inject.extensions</groupId>
  356. <artifactId>guice-servlet</artifactId>
  357. <version>3.0</version>
  358. </dependency>
  359. <dependency>
  360. <groupId>com.google.protobuf</groupId>
  361. <artifactId>protobuf-java</artifactId>
  362. <version>${protobuf.version}</version>
  363. </dependency>
  364. <dependency>
  365. <groupId>junit</groupId>
  366. <artifactId>junit</artifactId>
  367. <scope>test</scope>
  368. <version>4.10</version>
  369. </dependency>
  370. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  371. <dependency>
  372. <groupId>com.google.inject</groupId>
  373. <artifactId>guice</artifactId>
  374. <version>3.0</version>
  375. </dependency>
  376. <dependency>
  377. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  378. <artifactId>jersey-test-framework-core</artifactId>
  379. <version>1.11</version>
  380. <scope>test</scope>
  381. </dependency>
  382. <dependency>
  383. <groupId>com.sun.jersey</groupId>
  384. <artifactId>jersey-json</artifactId>
  385. <version>1.11</version>
  386. </dependency>
  387. <dependency>
  388. <groupId>com.sun.jersey.contribs</groupId>
  389. <artifactId>jersey-guice</artifactId>
  390. <version>1.11</version>
  391. </dependency>
  392. <dependency>
  393. <groupId>com.sun.jersey</groupId>
  394. <artifactId>jersey-server</artifactId>
  395. <version>1.11</version>
  396. </dependency>
  397. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  398. <dependency>
  399. <groupId>org.apache.hadoop</groupId>
  400. <artifactId>hadoop-yarn-common</artifactId>
  401. <version>${hadoop.version}</version>
  402. <type>test-jar</type>
  403. <scope>test</scope>
  404. </dependency>
  405. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  406. <dependency>
  407. <groupId>org.apache.hadoop</groupId>
  408. <artifactId>hadoop-yarn-common</artifactId>
  409. <version>${hadoop.version}</version>
  410. </dependency>
  411. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  412. <dependency>
  413. <groupId>org.apache.hadoop</groupId>
  414. <artifactId>hadoop-yarn-api</artifactId>
  415. <version>${hadoop.version}</version>
  416. </dependency>
  417. <dependency>
  418. <groupId>javax.xml.bind</groupId>
  419. <artifactId>jaxb-api</artifactId>
  420. <version>2.2.2</version>
  421. </dependency>
  422. <dependency>
  423. <groupId>org.codehaus.jettison</groupId>
  424. <artifactId>jettison</artifactId>
  425. <version>1.1</version>
  426. </dependency>
  427. <dependency>
  428. <groupId>com.sun.jersey</groupId>
  429. <artifactId>jersey-core</artifactId>
  430. <version>1.11</version>
  431. </dependency>
  432. <dependency>
  433. <groupId>com.sun.jersey</groupId>
  434. <artifactId>jersey-client</artifactId>
  435. <version>1.11</version>
  436. </dependency>
  437. <dependency>
  438. <groupId>org.apache.httpcomponents</groupId>
  439. <artifactId>httpclient</artifactId>
  440. <version>4.2.5</version>
  441. </dependency>
  442. <dependency>
  443. <groupId>com.google.guava</groupId>
  444. <artifactId>guava</artifactId>
  445. <version>14.0.1</version>
  446. </dependency>
  447. <dependency>
  448. <groupId>commons-logging</groupId>
  449. <artifactId>commons-logging</artifactId>
  450. <version>1.1.1</version>
  451. </dependency>
  452. <dependency>
  453. <groupId>org.apache.commons</groupId>
  454. <artifactId>commons-math3</artifactId>
  455. <version>3.4.1</version>
  456. </dependency>
  457. <dependency>
  458. <groupId>commons-io</groupId>
  459. <artifactId>commons-io</artifactId>
  460. <version>2.4</version>
  461. </dependency>
  462. <dependency>
  463. <groupId>org.apache.commons</groupId>
  464. <artifactId>commons-pool2</artifactId>
  465. <version>2.3</version>
  466. </dependency>
  467. <dependency>
  468. <groupId>org.apache.jmeter</groupId>
  469. <artifactId>ApacheJMeter_core</artifactId>
  470. <version>2.13</version>
  471. <scope>test</scope>
  472. <exclusions>
  473. <exclusion>
  474. <groupId>org.slf4j</groupId>
  475. <artifactId>slf4j-nop</artifactId>
  476. </exclusion>
  477. <exclusion>
  478. <groupId>commons-math3</groupId>
  479. <artifactId>commons-math3</artifactId>
  480. </exclusion>
  481. <exclusion>
  482. <groupId>commons-pool2</groupId>
  483. <artifactId>commons-pool2</artifactId>
  484. </exclusion>
  485. </exclusions>
  486. </dependency>
  487. <dependency>
  488. <groupId>org.apache.jmeter</groupId>
  489. <artifactId>ApacheJMeter_http</artifactId>
  490. <version>2.13</version>
  491. <scope>test</scope>
  492. <exclusions>
  493. <exclusion>
  494. <groupId>org.slf4j</groupId>
  495. <artifactId>slf4j-nop</artifactId>
  496. </exclusion>
  497. <exclusion>
  498. <groupId>commons-math3</groupId>
  499. <artifactId>commons-math3</artifactId>
  500. </exclusion>
  501. <exclusion>
  502. <groupId>commons-pool2</groupId>
  503. <artifactId>commons-pool2</artifactId>
  504. </exclusion>
  505. </exclusions>
  506. </dependency>
  507. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  508. <dependency>
  509. <groupId>org.apache.hadoop</groupId>
  510. <artifactId>hadoop-yarn-server-common</artifactId>
  511. <version>${hadoop.version}</version>
  512. </dependency>
  513. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  514. <dependency>
  515. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  516. <artifactId>jersey-test-framework-grizzly2</artifactId>
  517. <scope>test</scope>
  518. <version>1.11</version>
  519. </dependency>
  520. <dependency>
  521. <groupId>org.codehaus.jackson</groupId>
  522. <artifactId>jackson-core-asl</artifactId>
  523. <version>1.9.9</version>
  524. </dependency>
  525. <dependency>
  526. <groupId>org.slf4j</groupId>
  527. <artifactId>slf4j-api</artifactId>
  528. <version>1.7.2</version>
  529. </dependency>
  530. <dependency>
  531. <groupId>org.slf4j</groupId>
  532. <artifactId>slf4j-log4j12</artifactId>
  533. <version>1.7.2</version>
  534. </dependency>
  535. <dependency>
  536. <groupId>org.codehaus.jackson</groupId>
  537. <artifactId>jackson-mapper-asl</artifactId>
  538. <version>1.9.13</version>
  539. </dependency>
  540. <dependency>
  541. <groupId>commons-collections</groupId>
  542. <artifactId>commons-collections</artifactId>
  543. <version>3.2.1</version>
  544. </dependency>
  545. <dependency>
  546. <groupId>org.fusesource.leveldbjni</groupId>
  547. <artifactId>leveldbjni-all</artifactId>
  548. <version>1.8</version>
  549. </dependency>
  550. <dependency>
  551. <groupId>org.assertj</groupId>
  552. <artifactId>assertj-core</artifactId>
  553. <version>1.7.0</version>
  554. <scope>test</scope>
  555. </dependency>
  556. <dependency>
  557. <groupId>org.easymock</groupId>
  558. <artifactId>easymock</artifactId>
  559. <version>3.2</version>
  560. <scope>test</scope>
  561. </dependency>
  562. <!-- for unit tests only -->
  563. <dependency>
  564. <groupId>org.apache.phoenix</groupId>
  565. <artifactId>phoenix-core</artifactId>
  566. <type>test-jar</type>
  567. <version>${phoenix.version}</version>
  568. <scope>test</scope>
  569. </dependency>
  570. <dependency>
  571. <groupId>org.apache.hbase</groupId>
  572. <artifactId>hbase-it</artifactId>
  573. <version>${hbase.version}</version>
  574. <scope>test</scope>
  575. <classifier>tests</classifier>
  576. </dependency>
  577. <dependency>
  578. <groupId>org.apache.hbase</groupId>
  579. <artifactId>hbase-testing-util</artifactId>
  580. <version>${hbase.version}</version>
  581. <scope>test</scope>
  582. <optional>true</optional>
  583. <exclusions>
  584. <exclusion>
  585. <groupId>org.jruby</groupId>
  586. <artifactId>jruby-complete</artifactId>
  587. </exclusion>
  588. <exclusion>
  589. <artifactId>zookeeper</artifactId>
  590. <groupId>org.apache.zookeeper</groupId>
  591. </exclusion>
  592. </exclusions>
  593. </dependency>
  594. <dependency>
  595. <groupId>org.powermock</groupId>
  596. <artifactId>powermock-module-junit4</artifactId>
  597. <scope>test</scope>
  598. </dependency>
  599. <dependency>
  600. <groupId>org.powermock</groupId>
  601. <artifactId>powermock-api-mockito</artifactId>
  602. <scope>test</scope>
  603. </dependency>
  604. <dependency>
  605. <groupId>org.powermock</groupId>
  606. <artifactId>powermock-api-easymock</artifactId>
  607. <scope>test</scope>
  608. </dependency>
  609. <!-- Dependency in order to annotate unit tests with a category. -->
  610. <dependency>
  611. <groupId>utility</groupId>
  612. <artifactId>utility</artifactId>
  613. <version>1.0.0.0-SNAPSHOT</version>
  614. <scope>test</scope>
  615. </dependency>
  616. </dependencies>
  617. <profiles>
  618. <profile>
  619. <id>linux</id>
  620. <activation>
  621. <os>
  622. <family>unix</family>
  623. </os>
  624. </activation>
  625. <build>
  626. <plugins>
  627. <plugin>
  628. <groupId>org.apache.maven.plugins</groupId>
  629. <artifactId>maven-antrun-plugin</artifactId>
  630. <version>1.7</version>
  631. <executions>
  632. <execution>
  633. <phase>generate-resources</phase>
  634. <goals>
  635. <goal>run</goal>
  636. </goals>
  637. <configuration>
  638. <target name="Download HBase">
  639. <mkdir dir="${project.build.directory}/embedded" />
  640. <get
  641. src="${hbase.tar}"
  642. dest="${project.build.directory}/embedded/hbase.tar.gz"
  643. usetimestamp="true"
  644. />
  645. <untar
  646. src="${project.build.directory}/embedded/hbase.tar.gz"
  647. dest="${project.build.directory}/embedded"
  648. compression="gzip"
  649. />
  650. </target>
  651. </configuration>
  652. </execution>
  653. <execution>
  654. <id>phoenix_download</id>
  655. <phase>generate-resources</phase>
  656. <goals>
  657. <goal>run</goal>
  658. </goals>
  659. <configuration>
  660. <target name="Download Phoenix">
  661. <mkdir dir="${project.build.directory}/embedded"/>
  662. <get
  663. src="${phoenix.tar}"
  664. dest="${project.build.directory}/embedded/phoenix.tar.gz"
  665. usetimestamp="true"
  666. />
  667. <untar
  668. src="${project.build.directory}/embedded/phoenix.tar.gz"
  669. dest="${project.build.directory}/embedded"
  670. compression="gzip"
  671. />
  672. <move
  673. file="${project.build.directory}/embedded/${phoenix.folder}/phoenix-${phoenix.version}-server.jar"
  674. tofile="${project.build.directory}/embedded/${hbase.folder}/lib/phoenix-${phoenix.version}-server.jar"
  675. />
  676. </target>
  677. </configuration>
  678. </execution>
  679. </executions>
  680. </plugin>
  681. </plugins>
  682. </build>
  683. </profile>
  684. <profile>
  685. <id>windows</id>
  686. <activation>
  687. <os>
  688. <family>win</family>
  689. </os>
  690. </activation>
  691. <build>
  692. <plugins>
  693. <plugin>
  694. <groupId>org.apache.maven.plugins</groupId>
  695. <artifactId>maven-antrun-plugin</artifactId>
  696. <version>1.7</version>
  697. <executions>
  698. <execution>
  699. <id>hbase_download</id>
  700. <phase>generate-resources</phase>
  701. <goals>
  702. <goal>run</goal>
  703. </goals>
  704. <configuration>
  705. <target name="Download HBase">
  706. <mkdir dir="${project.build.directory}/embedded" />
  707. <get
  708. src="${hbase.winpkg.zip}"
  709. dest="${project.build.directory}/embedded/hbase.zip"
  710. usetimestamp="true"
  711. />
  712. <unzip
  713. src="${project.build.directory}/embedded/hbase.zip"
  714. dest="${project.build.directory}/embedded/hbase.temp"
  715. />
  716. <unzip
  717. src="${project.build.directory}/embedded/hbase.temp/resources/${hbase.winpkg.folder}.zip"
  718. dest="${project.build.directory}/embedded"
  719. />
  720. <copy
  721. file="${project.build.directory}/embedded/hbase.temp/resources/servicehost.exe"
  722. tofile="${project.build.directory}/embedded/${hbase.winpkg.folder}/bin/ams_hbase_master.exe"
  723. />
  724. </target>
  725. </configuration>
  726. </execution>
  727. </executions>
  728. </plugin>
  729. </plugins>
  730. </build>
  731. </profile>
  732. <profile>
  733. <id>sim</id>
  734. <build>
  735. <plugins>
  736. <plugin>
  737. <artifactId>maven-assembly-plugin</artifactId>
  738. <configuration>
  739. <descriptors>
  740. <descriptor>src/main/assemblies/simulator.xml</descriptor>
  741. </descriptors>
  742. <tarLongFileMode>gnu</tarLongFileMode>
  743. </configuration>
  744. <executions>
  745. <execution>
  746. <id>build-tarball</id>
  747. <phase>package</phase>
  748. <goals>
  749. <goal>single</goal>
  750. </goals>
  751. </execution>
  752. </executions>
  753. </plugin>
  754. <plugin>
  755. <artifactId>maven-jar-plugin</artifactId>
  756. <version>2.3.1</version>
  757. <!-- The configuration of the plugin -->
  758. <configuration>
  759. <!-- Configuration of the archiver -->
  760. <finalName>${project.artifactId}-simulator-${project.version}</finalName>
  761. <archive>
  762. <!-- Manifest specific configuration -->
  763. <manifest>
  764. <!-- Classpath is added to the manifest of the created jar file. -->
  765. <addClasspath>true</addClasspath>
  766. <!--
  767. Configures the classpath prefix. This configuration option is
  768. used to specify that all needed libraries are found under lib/
  769. directory.
  770. -->
  771. <classpathPrefix></classpathPrefix>
  772. <!-- Specifies the main class of the application -->
  773. <mainClass>
  774. org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.MetricsLoadSimulator
  775. </mainClass>
  776. </manifest>
  777. </archive>
  778. </configuration>
  779. </plugin>
  780. </plugins>
  781. </build>
  782. </profile>
  783. </profiles>
  784. </project>