pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  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.0.0-SNAPSHOT</version>
  24. </parent>
  25. <modelVersion>4.0.0</modelVersion>
  26. <artifactId>ambari-metrics-timelineservice</artifactId>
  27. <version>2.0.0-SNAPSHOT</version>
  28. <name>ambari-metrics-timelineservice</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.6.0.2.2.0.0, 2.6.0.2.2.1.0)</hadoop.version>
  35. <phoenix.version>4.2.0.2.2.0.0-2041</phoenix.version>
  36. <hbase.version>0.98.4.2.2.0.0-2041-hadoop2</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]+)(\.|-).*</regex>
  61. <replacement>$1.$2.$3</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.apache.maven.plugins</groupId>
  90. <artifactId>maven-antrun-plugin</artifactId>
  91. <version>1.7</version>
  92. <executions>
  93. <execution>
  94. <phase>generate-resources</phase>
  95. <goals>
  96. <goal>run</goal>
  97. </goals>
  98. <configuration>
  99. <target name="Download HBase">
  100. <mkdir dir="${project.build.directory}/embedded" />
  101. <get
  102. src="${hbase.tar}"
  103. dest="${project.build.directory}/embedded/hbase.tar.gz"
  104. usetimestamp="true"
  105. />
  106. <untar
  107. src="${project.build.directory}/embedded/hbase.tar.gz"
  108. dest="${project.build.directory}/embedded"
  109. compression="gzip"
  110. />
  111. </target>
  112. </configuration>
  113. </execution>
  114. </executions>
  115. </plugin>
  116. <plugin>
  117. <groupId>org.codehaus.mojo</groupId>
  118. <artifactId>rpm-maven-plugin</artifactId>
  119. <version>2.0.1</version>
  120. <executions>
  121. <execution>
  122. <!-- unbinds rpm creation from maven lifecycle -->
  123. <phase>none</phase>
  124. <goals>
  125. <goal>rpm</goal>
  126. </goals>
  127. </execution>
  128. </executions>
  129. <configuration>
  130. <name>ambari-metrics-collector</name>
  131. <copyright>2012, Apache Software Foundation</copyright>
  132. <group>Development</group>
  133. <description>Maven Recipe: RPM Package.</description>
  134. <autoRequires>false</autoRequires>
  135. <requires>
  136. <require>${python.ver}</require>
  137. </requires>
  138. <defaultFilemode>644</defaultFilemode>
  139. <defaultDirmode>755</defaultDirmode>
  140. <defaultUsername>root</defaultUsername>
  141. <defaultGroupname>root</defaultGroupname>
  142. <mappings>
  143. <mapping>
  144. <!--jars-->
  145. <directory>/usr/lib/ambari-metrics-collector/</directory>
  146. <sources>
  147. <source>
  148. <location>target/lib</location>
  149. </source>
  150. <source>
  151. <location>${project.build.directory}/${project.artifactId}-${project.version}.jar</location>
  152. </source>
  153. </sources>
  154. </mapping>
  155. <mapping>
  156. <!--embedded applications-->
  157. <directory>/usr/lib/ams-hbase/</directory>
  158. <sources>
  159. <source>
  160. <location>target/embedded/${hbase.folder}</location>
  161. <excludes>
  162. <exclude>bin/**</exclude>
  163. <exclude>bin/*</exclude>
  164. </excludes>
  165. </source>
  166. </sources>
  167. </mapping>
  168. <mapping>
  169. <directory>/usr/lib/ams-hbase/bin</directory>
  170. <filemode>755</filemode>
  171. <sources>
  172. <source>
  173. <location>target/embedded/${hbase.folder}/bin</location>
  174. </source>
  175. </sources>
  176. </mapping>
  177. <mapping>
  178. <directory>/usr/lib/ams-hbase/lib/</directory>
  179. <sources>
  180. <source>
  181. <location>target/lib</location>
  182. <includes>
  183. <include>phoenix*.jar</include>
  184. <include>antlr*.jar</include>
  185. </includes>
  186. </source>
  187. </sources>
  188. </mapping>
  189. <mapping>
  190. <directory>/usr/sbin</directory>
  191. <filemode>755</filemode>
  192. <username>root</username>
  193. <groupname>root</groupname>
  194. <directoryIncluded>false</directoryIncluded>
  195. <sources>
  196. <source>
  197. <location>conf/unix/ambari-metrics-collector</location>
  198. <filter>false</filter>
  199. </source>
  200. </sources>
  201. </mapping>
  202. <mapping>
  203. <directory>/etc/ambari-metrics-collector/conf</directory>
  204. <configuration>true</configuration>
  205. <sources>
  206. <source>
  207. <location>conf/unix/ams-env.sh</location>
  208. </source>
  209. <source>
  210. <location>conf/unix/ams-site.xml</location>
  211. </source>
  212. <source>
  213. <location>conf/unix/log4j.properties</location>
  214. </source>
  215. <source>
  216. <location>target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  217. </source>
  218. </sources>
  219. </mapping>
  220. <mapping>
  221. <directory>/etc/ams-hbase/conf</directory>
  222. <configuration>true</configuration>
  223. <sources>
  224. <source>
  225. <location>target/embedded/${hbase.folder}/conf</location>
  226. <includes>
  227. <include>*.*</include>
  228. </includes>
  229. </source>
  230. </sources>
  231. </mapping>
  232. <mapping>
  233. <directory>/var/run/ams-hbase</directory>
  234. </mapping>
  235. <mapping>
  236. <directory>/var/lib/ambari-metrics-collector</directory>
  237. </mapping>
  238. </mappings>
  239. </configuration>
  240. </plugin>
  241. <plugin>
  242. <artifactId>maven-surefire-plugin</artifactId>
  243. <configuration>
  244. <redirectTestOutputToFile>true</redirectTestOutputToFile>
  245. <forkMode>always</forkMode>
  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.0.0-SNAPSHOT</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>com.google.guava</groupId>
  410. <artifactId>guava</artifactId>
  411. <version>14.0.1</version>
  412. </dependency>
  413. <dependency>
  414. <groupId>commons-logging</groupId>
  415. <artifactId>commons-logging</artifactId>
  416. <version>1.1.1</version>
  417. </dependency>
  418. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  419. <dependency>
  420. <groupId>org.apache.hadoop</groupId>
  421. <artifactId>hadoop-yarn-server-common</artifactId>
  422. <version>${hadoop.version}</version>
  423. </dependency>
  424. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  425. <dependency>
  426. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  427. <artifactId>jersey-test-framework-grizzly2</artifactId>
  428. <scope>test</scope>
  429. <version>1.11</version>
  430. </dependency>
  431. <dependency>
  432. <groupId>org.codehaus.jackson</groupId>
  433. <artifactId>jackson-core-asl</artifactId>
  434. <version>1.9.9</version>
  435. </dependency>
  436. <dependency>
  437. <groupId>org.slf4j</groupId>
  438. <artifactId>slf4j-api</artifactId>
  439. <version>1.7.2</version>
  440. </dependency>
  441. <dependency>
  442. <groupId>org.slf4j</groupId>
  443. <artifactId>slf4j-log4j12</artifactId>
  444. <version>1.7.2</version>
  445. </dependency>
  446. <dependency>
  447. <groupId>org.codehaus.jackson</groupId>
  448. <artifactId>jackson-mapper-asl</artifactId>
  449. <version>1.9.13</version>
  450. </dependency>
  451. <dependency>
  452. <groupId>commons-collections</groupId>
  453. <artifactId>commons-collections</artifactId>
  454. <version>3.2.1</version>
  455. </dependency>
  456. <dependency>
  457. <groupId>org.fusesource.leveldbjni</groupId>
  458. <artifactId>leveldbjni-all</artifactId>
  459. <version>1.8</version>
  460. </dependency>
  461. <dependency>
  462. <groupId>org.assertj</groupId>
  463. <artifactId>assertj-core</artifactId>
  464. <version>1.7.0</version>
  465. <scope>test</scope>
  466. </dependency>
  467. <dependency>
  468. <groupId>org.easymock</groupId>
  469. <artifactId>easymock</artifactId>
  470. <version>3.2</version>
  471. <scope>test</scope>
  472. </dependency>
  473. <!-- for unit tests only -->
  474. <dependency>
  475. <groupId>org.apache.phoenix</groupId>
  476. <artifactId>phoenix-core</artifactId>
  477. <type>test-jar</type>
  478. <version>${phoenix.version}</version>
  479. <scope>test</scope>
  480. </dependency>
  481. <dependency>
  482. <groupId>org.apache.hbase</groupId>
  483. <artifactId>hbase-it</artifactId>
  484. <version>${hbase.version}</version>
  485. <scope>test</scope>
  486. <classifier>tests</classifier>
  487. </dependency>
  488. <dependency>
  489. <groupId>org.apache.hbase</groupId>
  490. <artifactId>hbase-testing-util</artifactId>
  491. <version>${hbase.version}</version>
  492. <scope>test</scope>
  493. <optional>true</optional>
  494. <exclusions>
  495. <exclusion>
  496. <groupId>org.jruby</groupId>
  497. <artifactId>jruby-complete</artifactId>
  498. </exclusion>
  499. </exclusions>
  500. </dependency>
  501. <dependency>
  502. <groupId>org.powermock</groupId>
  503. <artifactId>powermock-module-junit4</artifactId>
  504. <version>1.4.9</version>
  505. <scope>test</scope>
  506. </dependency>
  507. <dependency>
  508. <groupId>org.powermock</groupId>
  509. <artifactId>powermock-api-mockito</artifactId>
  510. <version>1.4.9</version>
  511. <scope>test</scope>
  512. </dependency>
  513. <dependency>
  514. <groupId>org.powermock</groupId>
  515. <artifactId>powermock-api-easymock</artifactId>
  516. <version>1.4.9</version>
  517. <scope>test</scope>
  518. </dependency>
  519. </dependencies>
  520. <profiles>
  521. <profile>
  522. <id>sim</id>
  523. <build>
  524. <plugins>
  525. <plugin>
  526. <artifactId>maven-assembly-plugin</artifactId>
  527. <configuration>
  528. <descriptors>
  529. <descriptor>src/main/assemblies/simulator.xml</descriptor>
  530. </descriptors>
  531. <tarLongFileMode>gnu</tarLongFileMode>
  532. </configuration>
  533. <executions>
  534. <execution>
  535. <id>build-tarball</id>
  536. <phase>package</phase>
  537. <goals>
  538. <goal>single</goal>
  539. </goals>
  540. </execution>
  541. </executions>
  542. </plugin>
  543. <plugin>
  544. <artifactId>maven-jar-plugin</artifactId>
  545. <version>2.3.1</version>
  546. <!-- The configuration of the plugin -->
  547. <configuration>
  548. <!-- Configuration of the archiver -->
  549. <finalName>${pom.artifactId}-simulator-${pom.version}</finalName>
  550. <archive>
  551. <!-- Manifest specific configuration -->
  552. <manifest>
  553. <!-- Classpath is added to the manifest of the created jar file. -->
  554. <addClasspath>true</addClasspath>
  555. <!--
  556. Configures the classpath prefix. This configuration option is
  557. used to specify that all needed libraries are found under lib/
  558. directory.
  559. -->
  560. <classpathPrefix></classpathPrefix>
  561. <!-- Specifies the main class of the application -->
  562. <mainClass>
  563. org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.MetricsLoadSimulator
  564. </mainClass>
  565. </manifest>
  566. </archive>
  567. </configuration>
  568. </plugin>
  569. </plugins>
  570. </build>
  571. </profile>
  572. </profiles>
  573. </project>