pom.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  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.1.2.3.4.0-3347</hadoop.version>
  35. <phoenix.version>4.4.0.2.3.4.0-3347</phoenix.version>
  36. <hbase.version>1.1.2.2.3.4.0-3347</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>/etc/ambari-metrics-collector/conf</directory>
  180. <configuration>true</configuration>
  181. <sources>
  182. <source>
  183. <location>conf/unix/ams-env.sh</location>
  184. </source>
  185. <source>
  186. <location>conf/unix/ams-site.xml</location>
  187. </source>
  188. <source>
  189. <location>conf/unix/log4j.properties</location>
  190. </source>
  191. <source>
  192. <location>target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  193. </source>
  194. </sources>
  195. </mapping>
  196. <mapping>
  197. <directory>/etc/ams-hbase/conf</directory>
  198. <configuration>true</configuration>
  199. <sources>
  200. <source>
  201. <location>target/embedded/${hbase.folder}/conf</location>
  202. <includes>
  203. <include>*.*</include>
  204. </includes>
  205. </source>
  206. </sources>
  207. </mapping>
  208. <mapping>
  209. <directory>/var/run/ams-hbase</directory>
  210. </mapping>
  211. <mapping>
  212. <directory>/var/lib/ambari-metrics-collector</directory>
  213. </mapping>
  214. </mappings>
  215. </configuration>
  216. </plugin>
  217. <plugin>
  218. <artifactId>maven-surefire-plugin</artifactId>
  219. <configuration>
  220. <redirectTestOutputToFile>true</redirectTestOutputToFile>
  221. <forkMode>always</forkMode>
  222. <argLine>-XX:-UseSplitVerifier</argLine>
  223. <!-- Each profile in the top-level pom.xml defines which test group categories to run. -->
  224. <groups>${testcase.groups}</groups>
  225. </configuration>
  226. </plugin>
  227. <plugin>
  228. <groupId>org.vafer</groupId>
  229. <artifactId>jdeb</artifactId>
  230. <version>1.0.1</version>
  231. <executions>
  232. <execution>
  233. <!--Stub execution on direct plugin call - workaround for ambari deb build process-->
  234. <id>stub-execution</id>
  235. <phase>none</phase>
  236. <goals>
  237. <goal>jdeb</goal>
  238. </goals>
  239. </execution>
  240. </executions>
  241. <configuration>
  242. <skip>true</skip>
  243. <attach>false</attach>
  244. <submodules>false</submodules>
  245. <controlDir>${project.basedir}/../src/main/package/deb/control</controlDir>
  246. </configuration>
  247. </plugin>
  248. </plugins>
  249. </build>
  250. <dependencies>
  251. <dependency>
  252. <groupId>org.apache.phoenix</groupId>
  253. <artifactId>phoenix-core</artifactId>
  254. <version>${phoenix.version}</version>
  255. <exclusions>
  256. <exclusion>
  257. <groupId>org.apache.hadoop</groupId>
  258. <artifactId>hadoop-common</artifactId>
  259. </exclusion>
  260. <exclusion>
  261. <groupId>org.apache.hadoop</groupId>
  262. <artifactId>hadoop-annotations</artifactId>
  263. </exclusion>
  264. </exclusions>
  265. </dependency>
  266. <dependency>
  267. <groupId>commons-lang</groupId>
  268. <artifactId>commons-lang</artifactId>
  269. <version>2.5</version>
  270. </dependency>
  271. <dependency>
  272. <groupId>org.apache.ambari</groupId>
  273. <artifactId>ambari-metrics-common</artifactId>
  274. <version>2.5.0.0.0</version>
  275. </dependency>
  276. <dependency>
  277. <groupId>javax.servlet</groupId>
  278. <artifactId>servlet-api</artifactId>
  279. <version>2.5</version>
  280. </dependency>
  281. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  282. <dependency>
  283. <groupId>org.apache.hadoop</groupId>
  284. <artifactId>hadoop-common</artifactId>
  285. <version>${hadoop.version}</version>
  286. <scope>provided</scope>
  287. <exclusions>
  288. <exclusion>
  289. <groupId>commons-el</groupId>
  290. <artifactId>commons-el</artifactId>
  291. </exclusion>
  292. <exclusion>
  293. <groupId>tomcat</groupId>
  294. <artifactId>jasper-runtime</artifactId>
  295. </exclusion>
  296. <exclusion>
  297. <groupId>tomcat</groupId>
  298. <artifactId>jasper-compiler</artifactId>
  299. </exclusion>
  300. <exclusion>
  301. <groupId>org.mortbay.jetty</groupId>
  302. <artifactId>jsp-2.1-jetty</artifactId>
  303. </exclusion>
  304. </exclusions>
  305. </dependency>
  306. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  307. <dependency>
  308. <groupId>org.apache.hadoop</groupId>
  309. <artifactId>hadoop-annotations</artifactId>
  310. <version>${hadoop.version}</version>
  311. </dependency>
  312. <dependency>
  313. <groupId>org.mockito</groupId>
  314. <artifactId>mockito-all</artifactId>
  315. <scope>test</scope>
  316. </dependency>
  317. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  318. <dependency>
  319. <groupId>org.apache.hadoop</groupId>
  320. <artifactId>hadoop-common</artifactId>
  321. <version>${hadoop.version}</version>
  322. <type>test-jar</type>
  323. <scope>test</scope>
  324. </dependency>
  325. <dependency>
  326. <groupId>com.google.inject.extensions</groupId>
  327. <artifactId>guice-servlet</artifactId>
  328. <version>3.0</version>
  329. </dependency>
  330. <dependency>
  331. <groupId>com.google.protobuf</groupId>
  332. <artifactId>protobuf-java</artifactId>
  333. <version>${protobuf.version}</version>
  334. </dependency>
  335. <dependency>
  336. <groupId>junit</groupId>
  337. <artifactId>junit</artifactId>
  338. <scope>test</scope>
  339. <version>4.10</version>
  340. </dependency>
  341. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  342. <dependency>
  343. <groupId>com.google.inject</groupId>
  344. <artifactId>guice</artifactId>
  345. <version>3.0</version>
  346. </dependency>
  347. <dependency>
  348. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  349. <artifactId>jersey-test-framework-core</artifactId>
  350. <version>1.11</version>
  351. <scope>test</scope>
  352. </dependency>
  353. <dependency>
  354. <groupId>com.sun.jersey</groupId>
  355. <artifactId>jersey-json</artifactId>
  356. <version>1.11</version>
  357. </dependency>
  358. <dependency>
  359. <groupId>com.sun.jersey.contribs</groupId>
  360. <artifactId>jersey-guice</artifactId>
  361. <version>1.11</version>
  362. </dependency>
  363. <dependency>
  364. <groupId>com.sun.jersey</groupId>
  365. <artifactId>jersey-server</artifactId>
  366. <version>1.11</version>
  367. </dependency>
  368. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  369. <dependency>
  370. <groupId>org.apache.hadoop</groupId>
  371. <artifactId>hadoop-yarn-common</artifactId>
  372. <version>${hadoop.version}</version>
  373. <type>test-jar</type>
  374. <scope>test</scope>
  375. </dependency>
  376. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  377. <dependency>
  378. <groupId>org.apache.hadoop</groupId>
  379. <artifactId>hadoop-yarn-common</artifactId>
  380. <version>${hadoop.version}</version>
  381. </dependency>
  382. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  383. <dependency>
  384. <groupId>org.apache.hadoop</groupId>
  385. <artifactId>hadoop-yarn-api</artifactId>
  386. <version>${hadoop.version}</version>
  387. </dependency>
  388. <dependency>
  389. <groupId>javax.xml.bind</groupId>
  390. <artifactId>jaxb-api</artifactId>
  391. <version>2.2.2</version>
  392. </dependency>
  393. <dependency>
  394. <groupId>org.codehaus.jettison</groupId>
  395. <artifactId>jettison</artifactId>
  396. <version>1.1</version>
  397. </dependency>
  398. <dependency>
  399. <groupId>com.sun.jersey</groupId>
  400. <artifactId>jersey-core</artifactId>
  401. <version>1.11</version>
  402. </dependency>
  403. <dependency>
  404. <groupId>com.sun.jersey</groupId>
  405. <artifactId>jersey-client</artifactId>
  406. <version>1.11</version>
  407. </dependency>
  408. <dependency>
  409. <groupId>org.apache.httpcomponents</groupId>
  410. <artifactId>httpclient</artifactId>
  411. <version>4.2.5</version>
  412. </dependency>
  413. <dependency>
  414. <groupId>com.google.guava</groupId>
  415. <artifactId>guava</artifactId>
  416. <version>14.0.1</version>
  417. </dependency>
  418. <dependency>
  419. <groupId>commons-logging</groupId>
  420. <artifactId>commons-logging</artifactId>
  421. <version>1.1.1</version>
  422. </dependency>
  423. <dependency>
  424. <groupId>org.apache.commons</groupId>
  425. <artifactId>commons-math3</artifactId>
  426. <version>3.4.1</version>
  427. </dependency>
  428. <dependency>
  429. <groupId>commons-io</groupId>
  430. <artifactId>commons-io</artifactId>
  431. <version>2.4</version>
  432. </dependency>
  433. <dependency>
  434. <groupId>org.apache.commons</groupId>
  435. <artifactId>commons-pool2</artifactId>
  436. <version>2.3</version>
  437. </dependency>
  438. <dependency>
  439. <groupId>org.apache.jmeter</groupId>
  440. <artifactId>ApacheJMeter_core</artifactId>
  441. <version>2.13</version>
  442. <scope>test</scope>
  443. <exclusions>
  444. <exclusion>
  445. <groupId>org.slf4j</groupId>
  446. <artifactId>slf4j-nop</artifactId>
  447. </exclusion>
  448. <exclusion>
  449. <groupId>commons-math3</groupId>
  450. <artifactId>commons-math3</artifactId>
  451. </exclusion>
  452. <exclusion>
  453. <groupId>commons-pool2</groupId>
  454. <artifactId>commons-pool2</artifactId>
  455. </exclusion>
  456. </exclusions>
  457. </dependency>
  458. <dependency>
  459. <groupId>org.apache.jmeter</groupId>
  460. <artifactId>ApacheJMeter_http</artifactId>
  461. <version>2.13</version>
  462. <scope>test</scope>
  463. <exclusions>
  464. <exclusion>
  465. <groupId>org.slf4j</groupId>
  466. <artifactId>slf4j-nop</artifactId>
  467. </exclusion>
  468. <exclusion>
  469. <groupId>commons-math3</groupId>
  470. <artifactId>commons-math3</artifactId>
  471. </exclusion>
  472. <exclusion>
  473. <groupId>commons-pool2</groupId>
  474. <artifactId>commons-pool2</artifactId>
  475. </exclusion>
  476. </exclusions>
  477. </dependency>
  478. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  479. <dependency>
  480. <groupId>org.apache.hadoop</groupId>
  481. <artifactId>hadoop-yarn-server-common</artifactId>
  482. <version>${hadoop.version}</version>
  483. </dependency>
  484. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  485. <dependency>
  486. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  487. <artifactId>jersey-test-framework-grizzly2</artifactId>
  488. <scope>test</scope>
  489. <version>1.11</version>
  490. </dependency>
  491. <dependency>
  492. <groupId>org.codehaus.jackson</groupId>
  493. <artifactId>jackson-core-asl</artifactId>
  494. <version>1.9.9</version>
  495. </dependency>
  496. <dependency>
  497. <groupId>org.slf4j</groupId>
  498. <artifactId>slf4j-api</artifactId>
  499. <version>1.7.2</version>
  500. </dependency>
  501. <dependency>
  502. <groupId>org.slf4j</groupId>
  503. <artifactId>slf4j-log4j12</artifactId>
  504. <version>1.7.2</version>
  505. </dependency>
  506. <dependency>
  507. <groupId>org.codehaus.jackson</groupId>
  508. <artifactId>jackson-mapper-asl</artifactId>
  509. <version>1.9.13</version>
  510. </dependency>
  511. <dependency>
  512. <groupId>commons-collections</groupId>
  513. <artifactId>commons-collections</artifactId>
  514. <version>3.2.1</version>
  515. </dependency>
  516. <dependency>
  517. <groupId>org.fusesource.leveldbjni</groupId>
  518. <artifactId>leveldbjni-all</artifactId>
  519. <version>1.8</version>
  520. </dependency>
  521. <dependency>
  522. <groupId>org.assertj</groupId>
  523. <artifactId>assertj-core</artifactId>
  524. <version>1.7.0</version>
  525. <scope>test</scope>
  526. </dependency>
  527. <dependency>
  528. <groupId>org.easymock</groupId>
  529. <artifactId>easymock</artifactId>
  530. <version>3.2</version>
  531. <scope>test</scope>
  532. </dependency>
  533. <!-- for unit tests only -->
  534. <dependency>
  535. <groupId>org.apache.phoenix</groupId>
  536. <artifactId>phoenix-core</artifactId>
  537. <type>test-jar</type>
  538. <version>${phoenix.version}</version>
  539. <scope>test</scope>
  540. </dependency>
  541. <dependency>
  542. <groupId>org.apache.hbase</groupId>
  543. <artifactId>hbase-it</artifactId>
  544. <version>${hbase.version}</version>
  545. <scope>test</scope>
  546. <classifier>tests</classifier>
  547. </dependency>
  548. <dependency>
  549. <groupId>org.apache.hbase</groupId>
  550. <artifactId>hbase-testing-util</artifactId>
  551. <version>${hbase.version}</version>
  552. <scope>test</scope>
  553. <optional>true</optional>
  554. <exclusions>
  555. <exclusion>
  556. <groupId>org.jruby</groupId>
  557. <artifactId>jruby-complete</artifactId>
  558. </exclusion>
  559. </exclusions>
  560. </dependency>
  561. <dependency>
  562. <groupId>org.powermock</groupId>
  563. <artifactId>powermock-module-junit4</artifactId>
  564. <scope>test</scope>
  565. </dependency>
  566. <dependency>
  567. <groupId>org.powermock</groupId>
  568. <artifactId>powermock-api-mockito</artifactId>
  569. <scope>test</scope>
  570. </dependency>
  571. <dependency>
  572. <groupId>org.powermock</groupId>
  573. <artifactId>powermock-api-easymock</artifactId>
  574. <scope>test</scope>
  575. </dependency>
  576. <!-- Dependency in order to annotate unit tests with a category. -->
  577. <dependency>
  578. <groupId>utility</groupId>
  579. <artifactId>utility</artifactId>
  580. <version>1.0.0.0-SNAPSHOT</version>
  581. <scope>test</scope>
  582. </dependency>
  583. </dependencies>
  584. <profiles>
  585. <profile>
  586. <id>linux</id>
  587. <activation>
  588. <os>
  589. <family>unix</family>
  590. </os>
  591. </activation>
  592. <build>
  593. <plugins>
  594. <plugin>
  595. <groupId>org.apache.maven.plugins</groupId>
  596. <artifactId>maven-antrun-plugin</artifactId>
  597. <version>1.7</version>
  598. <executions>
  599. <execution>
  600. <phase>generate-resources</phase>
  601. <goals>
  602. <goal>run</goal>
  603. </goals>
  604. <configuration>
  605. <target name="Download HBase">
  606. <mkdir dir="${project.build.directory}/embedded" />
  607. <get
  608. src="${hbase.tar}"
  609. dest="${project.build.directory}/embedded/hbase.tar.gz"
  610. usetimestamp="true"
  611. />
  612. <untar
  613. src="${project.build.directory}/embedded/hbase.tar.gz"
  614. dest="${project.build.directory}/embedded"
  615. compression="gzip"
  616. />
  617. </target>
  618. </configuration>
  619. </execution>
  620. <execution>
  621. <id>phoenix_download</id>
  622. <phase>generate-resources</phase>
  623. <goals>
  624. <goal>run</goal>
  625. </goals>
  626. <configuration>
  627. <target name="Download Phoenix">
  628. <mkdir dir="${project.build.directory}/embedded"/>
  629. <get
  630. src="${phoenix.tar}"
  631. dest="${project.build.directory}/embedded/phoenix.tar.gz"
  632. usetimestamp="true"
  633. />
  634. <untar
  635. src="${project.build.directory}/embedded/phoenix.tar.gz"
  636. dest="${project.build.directory}/embedded"
  637. compression="gzip"
  638. />
  639. <move
  640. file="${project.build.directory}/embedded/${phoenix.folder}/phoenix-${phoenix.version}-server.jar"
  641. tofile="${project.build.directory}/embedded/${hbase.folder}/lib/phoenix-${phoenix.version}-server.jar"
  642. />
  643. </target>
  644. </configuration>
  645. </execution>
  646. </executions>
  647. </plugin>
  648. </plugins>
  649. </build>
  650. </profile>
  651. <profile>
  652. <id>windows</id>
  653. <activation>
  654. <os>
  655. <family>win</family>
  656. </os>
  657. </activation>
  658. <build>
  659. <plugins>
  660. <plugin>
  661. <groupId>org.apache.maven.plugins</groupId>
  662. <artifactId>maven-antrun-plugin</artifactId>
  663. <version>1.7</version>
  664. <executions>
  665. <execution>
  666. <id>hbase_download</id>
  667. <phase>generate-resources</phase>
  668. <goals>
  669. <goal>run</goal>
  670. </goals>
  671. <configuration>
  672. <target name="Download HBase">
  673. <mkdir dir="${project.build.directory}/embedded" />
  674. <get
  675. src="${hbase.winpkg.zip}"
  676. dest="${project.build.directory}/embedded/hbase.zip"
  677. usetimestamp="true"
  678. />
  679. <unzip
  680. src="${project.build.directory}/embedded/hbase.zip"
  681. dest="${project.build.directory}/embedded/hbase.temp"
  682. />
  683. <unzip
  684. src="${project.build.directory}/embedded/hbase.temp/resources/${hbase.winpkg.folder}.zip"
  685. dest="${project.build.directory}/embedded"
  686. />
  687. <copy
  688. file="${project.build.directory}/embedded/hbase.temp/resources/servicehost.exe"
  689. tofile="${project.build.directory}/embedded/${hbase.winpkg.folder}/bin/ams_hbase_master.exe"
  690. />
  691. </target>
  692. </configuration>
  693. </execution>
  694. </executions>
  695. </plugin>
  696. </plugins>
  697. </build>
  698. </profile>
  699. <profile>
  700. <id>sim</id>
  701. <build>
  702. <plugins>
  703. <plugin>
  704. <artifactId>maven-assembly-plugin</artifactId>
  705. <configuration>
  706. <descriptors>
  707. <descriptor>src/main/assemblies/simulator.xml</descriptor>
  708. </descriptors>
  709. <tarLongFileMode>gnu</tarLongFileMode>
  710. </configuration>
  711. <executions>
  712. <execution>
  713. <id>build-tarball</id>
  714. <phase>package</phase>
  715. <goals>
  716. <goal>single</goal>
  717. </goals>
  718. </execution>
  719. </executions>
  720. </plugin>
  721. <plugin>
  722. <artifactId>maven-jar-plugin</artifactId>
  723. <version>2.3.1</version>
  724. <!-- The configuration of the plugin -->
  725. <configuration>
  726. <!-- Configuration of the archiver -->
  727. <finalName>${project.artifactId}-simulator-${project.version}</finalName>
  728. <archive>
  729. <!-- Manifest specific configuration -->
  730. <manifest>
  731. <!-- Classpath is added to the manifest of the created jar file. -->
  732. <addClasspath>true</addClasspath>
  733. <!--
  734. Configures the classpath prefix. This configuration option is
  735. used to specify that all needed libraries are found under lib/
  736. directory.
  737. -->
  738. <classpathPrefix></classpathPrefix>
  739. <!-- Specifies the main class of the application -->
  740. <mainClass>
  741. org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.MetricsLoadSimulator
  742. </mainClass>
  743. </manifest>
  744. </archive>
  745. </configuration>
  746. </plugin>
  747. </plugins>
  748. </build>
  749. </profile>
  750. </profiles>
  751. </project>