pom.xml 25 KB

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