pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  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>0.1.0-SNAPSHOT</version>
  24. </parent>
  25. <modelVersion>4.0.0</modelVersion>
  26. <artifactId>ambari-metrics-timelineservice</artifactId>
  27. <version>0.1.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/run/ambari-metrics-collector</directory>
  237. </mapping>
  238. <mapping>
  239. <directory>/var/log/ambari-metrics-collector</directory>
  240. </mapping>
  241. <mapping>
  242. <directory>/var/lib/ambari-metrics-collector</directory>
  243. </mapping>
  244. </mappings>
  245. </configuration>
  246. </plugin>
  247. <plugin>
  248. <artifactId>maven-surefire-plugin</artifactId>
  249. <configuration>
  250. <redirectTestOutputToFile>true</redirectTestOutputToFile>
  251. <forkMode>always</forkMode>
  252. </configuration>
  253. </plugin>
  254. </plugins>
  255. </build>
  256. <dependencies>
  257. <dependency>
  258. <groupId>org.apache.phoenix</groupId>
  259. <artifactId>phoenix-core</artifactId>
  260. <version>${phoenix.version}</version>
  261. <exclusions>
  262. <exclusion>
  263. <groupId>org.apache.hadoop</groupId>
  264. <artifactId>hadoop-common</artifactId>
  265. </exclusion>
  266. <exclusion>
  267. <groupId>org.apache.hadoop</groupId>
  268. <artifactId>hadoop-annotations</artifactId>
  269. </exclusion>
  270. </exclusions>
  271. </dependency>
  272. <dependency>
  273. <groupId>commons-lang</groupId>
  274. <artifactId>commons-lang</artifactId>
  275. <version>2.5</version>
  276. </dependency>
  277. <dependency>
  278. <groupId>org.apache.ambari</groupId>
  279. <artifactId>ambari-metrics-common</artifactId>
  280. <version>0.1.0-SNAPSHOT</version>
  281. </dependency>
  282. <dependency>
  283. <groupId>javax.servlet</groupId>
  284. <artifactId>servlet-api</artifactId>
  285. <version>2.5</version>
  286. </dependency>
  287. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  288. <dependency>
  289. <groupId>org.apache.hadoop</groupId>
  290. <artifactId>hadoop-common</artifactId>
  291. <version>${hadoop.version}</version>
  292. <scope>provided</scope>
  293. <exclusions>
  294. <exclusion>
  295. <groupId>commons-el</groupId>
  296. <artifactId>commons-el</artifactId>
  297. </exclusion>
  298. <exclusion>
  299. <groupId>tomcat</groupId>
  300. <artifactId>jasper-runtime</artifactId>
  301. </exclusion>
  302. <exclusion>
  303. <groupId>tomcat</groupId>
  304. <artifactId>jasper-compiler</artifactId>
  305. </exclusion>
  306. <exclusion>
  307. <groupId>org.mortbay.jetty</groupId>
  308. <artifactId>jsp-2.1-jetty</artifactId>
  309. </exclusion>
  310. </exclusions>
  311. </dependency>
  312. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  313. <dependency>
  314. <groupId>org.apache.hadoop</groupId>
  315. <artifactId>hadoop-annotations</artifactId>
  316. <version>${hadoop.version}</version>
  317. </dependency>
  318. <dependency>
  319. <groupId>org.mockito</groupId>
  320. <artifactId>mockito-all</artifactId>
  321. <version>1.8.5</version>
  322. <scope>test</scope>
  323. </dependency>
  324. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  325. <dependency>
  326. <groupId>org.apache.hadoop</groupId>
  327. <artifactId>hadoop-common</artifactId>
  328. <version>${hadoop.version}</version>
  329. <type>test-jar</type>
  330. <scope>test</scope>
  331. </dependency>
  332. <dependency>
  333. <groupId>com.google.inject.extensions</groupId>
  334. <artifactId>guice-servlet</artifactId>
  335. <version>3.0</version>
  336. </dependency>
  337. <dependency>
  338. <groupId>com.google.protobuf</groupId>
  339. <artifactId>protobuf-java</artifactId>
  340. <version>${protobuf.version}</version>
  341. </dependency>
  342. <dependency>
  343. <groupId>junit</groupId>
  344. <artifactId>junit</artifactId>
  345. <scope>test</scope>
  346. <version>4.10</version>
  347. </dependency>
  348. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  349. <dependency>
  350. <groupId>com.google.inject</groupId>
  351. <artifactId>guice</artifactId>
  352. <version>3.0</version>
  353. </dependency>
  354. <dependency>
  355. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  356. <artifactId>jersey-test-framework-core</artifactId>
  357. <version>1.11</version>
  358. <scope>test</scope>
  359. </dependency>
  360. <dependency>
  361. <groupId>com.sun.jersey</groupId>
  362. <artifactId>jersey-json</artifactId>
  363. <version>1.11</version>
  364. </dependency>
  365. <dependency>
  366. <groupId>com.sun.jersey.contribs</groupId>
  367. <artifactId>jersey-guice</artifactId>
  368. <version>1.11</version>
  369. </dependency>
  370. <dependency>
  371. <groupId>com.sun.jersey</groupId>
  372. <artifactId>jersey-server</artifactId>
  373. <version>1.11</version>
  374. </dependency>
  375. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  376. <dependency>
  377. <groupId>org.apache.hadoop</groupId>
  378. <artifactId>hadoop-yarn-common</artifactId>
  379. <version>${hadoop.version}</version>
  380. <type>test-jar</type>
  381. <scope>test</scope>
  382. </dependency>
  383. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  384. <dependency>
  385. <groupId>org.apache.hadoop</groupId>
  386. <artifactId>hadoop-yarn-common</artifactId>
  387. <version>${hadoop.version}</version>
  388. </dependency>
  389. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  390. <dependency>
  391. <groupId>org.apache.hadoop</groupId>
  392. <artifactId>hadoop-yarn-api</artifactId>
  393. <version>${hadoop.version}</version>
  394. </dependency>
  395. <dependency>
  396. <groupId>javax.xml.bind</groupId>
  397. <artifactId>jaxb-api</artifactId>
  398. <version>2.2.2</version>
  399. </dependency>
  400. <dependency>
  401. <groupId>org.codehaus.jettison</groupId>
  402. <artifactId>jettison</artifactId>
  403. <version>1.1</version>
  404. </dependency>
  405. <dependency>
  406. <groupId>com.sun.jersey</groupId>
  407. <artifactId>jersey-core</artifactId>
  408. <version>1.11</version>
  409. </dependency>
  410. <dependency>
  411. <groupId>com.sun.jersey</groupId>
  412. <artifactId>jersey-client</artifactId>
  413. <version>1.11</version>
  414. </dependency>
  415. <dependency>
  416. <groupId>com.google.guava</groupId>
  417. <artifactId>guava</artifactId>
  418. <version>14.0.1</version>
  419. </dependency>
  420. <dependency>
  421. <groupId>commons-logging</groupId>
  422. <artifactId>commons-logging</artifactId>
  423. <version>1.1.1</version>
  424. </dependency>
  425. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  426. <dependency>
  427. <groupId>org.apache.hadoop</groupId>
  428. <artifactId>hadoop-yarn-server-common</artifactId>
  429. <version>${hadoop.version}</version>
  430. </dependency>
  431. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  432. <dependency>
  433. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  434. <artifactId>jersey-test-framework-grizzly2</artifactId>
  435. <scope>test</scope>
  436. <version>1.11</version>
  437. </dependency>
  438. <dependency>
  439. <groupId>org.codehaus.jackson</groupId>
  440. <artifactId>jackson-core-asl</artifactId>
  441. <version>1.9.9</version>
  442. </dependency>
  443. <dependency>
  444. <groupId>org.slf4j</groupId>
  445. <artifactId>slf4j-api</artifactId>
  446. <version>1.7.2</version>
  447. </dependency>
  448. <dependency>
  449. <groupId>org.slf4j</groupId>
  450. <artifactId>slf4j-log4j12</artifactId>
  451. <version>1.7.2</version>
  452. </dependency>
  453. <dependency>
  454. <groupId>org.codehaus.jackson</groupId>
  455. <artifactId>jackson-mapper-asl</artifactId>
  456. <version>1.9.13</version>
  457. </dependency>
  458. <dependency>
  459. <groupId>commons-collections</groupId>
  460. <artifactId>commons-collections</artifactId>
  461. <version>3.2.1</version>
  462. </dependency>
  463. <dependency>
  464. <groupId>org.fusesource.leveldbjni</groupId>
  465. <artifactId>leveldbjni-all</artifactId>
  466. <version>1.8</version>
  467. </dependency>
  468. <dependency>
  469. <groupId>org.assertj</groupId>
  470. <artifactId>assertj-core</artifactId>
  471. <version>1.7.0</version>
  472. <scope>test</scope>
  473. </dependency>
  474. <dependency>
  475. <groupId>org.easymock</groupId>
  476. <artifactId>easymock</artifactId>
  477. <version>3.2</version>
  478. <scope>test</scope>
  479. </dependency>
  480. <!-- for unit tests only -->
  481. <dependency>
  482. <groupId>org.apache.phoenix</groupId>
  483. <artifactId>phoenix-core</artifactId>
  484. <type>test-jar</type>
  485. <version>${phoenix.version}</version>
  486. <scope>test</scope>
  487. </dependency>
  488. <dependency>
  489. <groupId>org.apache.hbase</groupId>
  490. <artifactId>hbase-it</artifactId>
  491. <version>${hbase.version}</version>
  492. <scope>test</scope>
  493. <classifier>tests</classifier>
  494. </dependency>
  495. <dependency>
  496. <groupId>org.apache.hbase</groupId>
  497. <artifactId>hbase-testing-util</artifactId>
  498. <version>${hbase.version}</version>
  499. <scope>test</scope>
  500. <optional>true</optional>
  501. <exclusions>
  502. <exclusion>
  503. <groupId>org.jruby</groupId>
  504. <artifactId>jruby-complete</artifactId>
  505. </exclusion>
  506. </exclusions>
  507. </dependency>
  508. <dependency>
  509. <groupId>org.powermock</groupId>
  510. <artifactId>powermock-module-junit4</artifactId>
  511. <version>1.4.9</version>
  512. <scope>test</scope>
  513. </dependency>
  514. <dependency>
  515. <groupId>org.powermock</groupId>
  516. <artifactId>powermock-api-mockito</artifactId>
  517. <version>1.4.9</version>
  518. <scope>test</scope>
  519. </dependency>
  520. <dependency>
  521. <groupId>org.powermock</groupId>
  522. <artifactId>powermock-api-easymock</artifactId>
  523. <version>1.4.9</version>
  524. <scope>test</scope>
  525. </dependency>
  526. </dependencies>
  527. <profiles>
  528. <profile>
  529. <id>sim</id>
  530. <build>
  531. <plugins>
  532. <plugin>
  533. <artifactId>maven-assembly-plugin</artifactId>
  534. <configuration>
  535. <descriptors>
  536. <descriptor>src/main/assemblies/simulator.xml</descriptor>
  537. </descriptors>
  538. <tarLongFileMode>gnu</tarLongFileMode>
  539. </configuration>
  540. <executions>
  541. <execution>
  542. <id>build-tarball</id>
  543. <phase>package</phase>
  544. <goals>
  545. <goal>single</goal>
  546. </goals>
  547. </execution>
  548. </executions>
  549. </plugin>
  550. <plugin>
  551. <artifactId>maven-jar-plugin</artifactId>
  552. <version>2.3.1</version>
  553. <!-- The configuration of the plugin -->
  554. <configuration>
  555. <!-- Configuration of the archiver -->
  556. <finalName>${pom.artifactId}-simulator-${pom.version}</finalName>
  557. <archive>
  558. <!-- Manifest specific configuration -->
  559. <manifest>
  560. <!-- Classpath is added to the manifest of the created jar file. -->
  561. <addClasspath>true</addClasspath>
  562. <!--
  563. Configures the classpath prefix. This configuration option is
  564. used to specify that all needed libraries are found under lib/
  565. directory.
  566. -->
  567. <classpathPrefix></classpathPrefix>
  568. <!-- Specifies the main class of the application -->
  569. <mainClass>
  570. org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.MetricsLoadSimulator
  571. </mainClass>
  572. </manifest>
  573. </archive>
  574. </configuration>
  575. </plugin>
  576. </plugins>
  577. </build>
  578. </profile>
  579. </profiles>
  580. </project>