pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  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.4.0</hadoop.version>
  35. <phoenix.version>4.2.0.2.2.0.0-2041</phoenix.version>
  36. </properties>
  37. <build>
  38. <plugins>
  39. <plugin>
  40. <artifactId>maven-dependency-plugin</artifactId>
  41. <executions>
  42. <execution>
  43. <phase>package</phase>
  44. <goals>
  45. <goal>copy-dependencies</goal>
  46. </goals>
  47. <configuration>
  48. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  49. <includeScope>compile</includeScope>
  50. <excludeScope>test</excludeScope>
  51. </configuration>
  52. </execution>
  53. </executions>
  54. </plugin>
  55. <plugin>
  56. <artifactId>maven-assembly-plugin</artifactId>
  57. <executions>
  58. <execution>
  59. <configuration>
  60. <descriptors>
  61. <descriptor>src/main/assemblies/ats.xml</descriptor>
  62. </descriptors>
  63. <tarLongFileMode>gnu</tarLongFileMode>
  64. </configuration>
  65. <id>build-tarball</id>
  66. <phase>none</phase>
  67. <goals>
  68. <goal>single</goal>
  69. </goals>
  70. </execution>
  71. </executions>
  72. </plugin>
  73. <plugin>
  74. <groupId>org.apache.maven.plugins</groupId>
  75. <artifactId>maven-antrun-plugin</artifactId>
  76. <version>1.7</version>
  77. <executions>
  78. <execution>
  79. <phase>generate-resources</phase>
  80. <goals>
  81. <goal>run</goal>
  82. </goals>
  83. <configuration>
  84. <target name="Download HBase">
  85. <mkdir dir="${project.build.directory}/embedded" />
  86. <get
  87. src="${hbase.tar}"
  88. dest="${project.build.directory}/embedded/hbase.tar.gz"
  89. />
  90. <untar
  91. src="${project.build.directory}/embedded/hbase.tar.gz"
  92. dest="${project.build.directory}/embedded"
  93. compression="gzip"
  94. />
  95. </target>
  96. </configuration>
  97. </execution>
  98. </executions>
  99. </plugin>
  100. <plugin>
  101. <groupId>org.codehaus.mojo</groupId>
  102. <artifactId>rpm-maven-plugin</artifactId>
  103. <version>2.0.1</version>
  104. <executions>
  105. <execution>
  106. <!-- unbinds rpm creation from maven lifecycle -->
  107. <phase>none</phase>
  108. <goals>
  109. <goal>rpm</goal>
  110. </goals>
  111. </execution>
  112. </executions>
  113. <configuration>
  114. <name>ambari-metrics-collector</name>
  115. <copyright>2012, Apache Software Foundation</copyright>
  116. <group>Development</group>
  117. <description>Maven Recipe: RPM Package.</description>
  118. <autoRequires>false</autoRequires>
  119. <requires>
  120. <require>${python.ver}</require>
  121. </requires>
  122. <defaultFilemode>644</defaultFilemode>
  123. <defaultDirmode>755</defaultDirmode>
  124. <defaultUsername>root</defaultUsername>
  125. <defaultGroupname>root</defaultGroupname>
  126. <mappings>
  127. <mapping>
  128. <!--jars-->
  129. <directory>/usr/lib/ambari-metrics-collector/</directory>
  130. <sources>
  131. <source>
  132. <location>target/lib</location>
  133. </source>
  134. <source>
  135. <location>${project.build.directory}/${project.artifactId}-${project.version}.jar</location>
  136. </source>
  137. </sources>
  138. </mapping>
  139. <mapping>
  140. <!--embedded applications-->
  141. <directory>/usr/lib/ams-hbase/</directory>
  142. <sources>
  143. <source>
  144. <location>target/embedded/${hbase.folder}</location>
  145. <excludes>
  146. <exclude>bin/**</exclude>
  147. <exclude>bin/*</exclude>
  148. </excludes>
  149. </source>
  150. </sources>
  151. </mapping>
  152. <mapping>
  153. <directory>/usr/lib/ams-hbase/bin</directory>
  154. <filemode>755</filemode>
  155. <sources>
  156. <source>
  157. <location>target/embedded/${hbase.folder}/bin</location>
  158. </source>
  159. </sources>
  160. </mapping>
  161. <mapping>
  162. <directory>/usr/lib/ams-hbase/lib/</directory>
  163. <sources>
  164. <source>
  165. <location>target/lib</location>
  166. <includes>
  167. <include>phoenix*.jar</include>
  168. <include>antlr*.jar</include>
  169. </includes>
  170. </source>
  171. </sources>
  172. </mapping>
  173. <mapping>
  174. <directory>/usr/sbin</directory>
  175. <filemode>755</filemode>
  176. <username>root</username>
  177. <groupname>root</groupname>
  178. <directoryIncluded>false</directoryIncluded>
  179. <sources>
  180. <source>
  181. <location>conf/unix/ambari-metrics-collector</location>
  182. <filter>false</filter>
  183. </source>
  184. </sources>
  185. </mapping>
  186. <mapping>
  187. <directory>/etc/ambari-metrics-collector/conf</directory>
  188. <configuration>true</configuration>
  189. <sources>
  190. <source>
  191. <location>conf/unix/ams-env.sh</location>
  192. </source>
  193. <source>
  194. <location>conf/unix/ams-site.xml</location>
  195. </source>
  196. <source>
  197. <location>conf/unix/log4j.properties</location>
  198. </source>
  199. <source>
  200. <location>target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  201. </source>
  202. </sources>
  203. </mapping>
  204. <mapping>
  205. <directory>/etc/ams-hbase/conf</directory>
  206. <configuration>true</configuration>
  207. <sources>
  208. <source>
  209. <location>target/embedded/${hbase.folder}/conf</location>
  210. <includes>
  211. <include>*.*</include>
  212. </includes>
  213. </source>
  214. </sources>
  215. </mapping>
  216. <mapping>
  217. <directory>/var/run/ams-hbase</directory>
  218. </mapping>
  219. <mapping>
  220. <directory>/var/run/ambari-metrics-collector</directory>
  221. </mapping>
  222. <mapping>
  223. <directory>/var/log/ambari-metrics-collector</directory>
  224. </mapping>
  225. <mapping>
  226. <directory>/var/lib/ambari-metrics-collector</directory>
  227. </mapping>
  228. </mappings>
  229. </configuration>
  230. </plugin>
  231. <plugin>
  232. <artifactId>maven-surefire-plugin</artifactId>
  233. <configuration>
  234. <redirectTestOutputToFile>true</redirectTestOutputToFile>
  235. <forkMode>always</forkMode>
  236. </configuration>
  237. </plugin>
  238. </plugins>
  239. </build>
  240. <dependencies>
  241. <dependency>
  242. <groupId>org.apache.phoenix</groupId>
  243. <artifactId>phoenix-core</artifactId>
  244. <version>${phoenix.version}</version>
  245. <exclusions>
  246. <exclusion>
  247. <groupId>org.apache.hadoop</groupId>
  248. <artifactId>hadoop-common</artifactId>
  249. </exclusion>
  250. <exclusion>
  251. <groupId>org.apache.hadoop</groupId>
  252. <artifactId>hadoop-annotations</artifactId>
  253. </exclusion>
  254. </exclusions>
  255. </dependency>
  256. <dependency>
  257. <groupId>commons-lang</groupId>
  258. <artifactId>commons-lang</artifactId>
  259. <version>2.5</version>
  260. </dependency>
  261. <dependency>
  262. <groupId>org.apache.ambari</groupId>
  263. <artifactId>ambari-metrics-common</artifactId>
  264. <version>0.1.0-SNAPSHOT</version>
  265. </dependency>
  266. <dependency>
  267. <groupId>javax.servlet</groupId>
  268. <artifactId>servlet-api</artifactId>
  269. <version>2.5</version>
  270. </dependency>
  271. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  272. <dependency>
  273. <groupId>org.apache.hadoop</groupId>
  274. <artifactId>hadoop-common</artifactId>
  275. <version>${hadoop.version}</version>
  276. <scope>provided</scope>
  277. <exclusions>
  278. <exclusion>
  279. <groupId>commons-el</groupId>
  280. <artifactId>commons-el</artifactId>
  281. </exclusion>
  282. <exclusion>
  283. <groupId>tomcat</groupId>
  284. <artifactId>jasper-runtime</artifactId>
  285. </exclusion>
  286. <exclusion>
  287. <groupId>tomcat</groupId>
  288. <artifactId>jasper-compiler</artifactId>
  289. </exclusion>
  290. <exclusion>
  291. <groupId>org.mortbay.jetty</groupId>
  292. <artifactId>jsp-2.1-jetty</artifactId>
  293. </exclusion>
  294. </exclusions>
  295. </dependency>
  296. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  297. <dependency>
  298. <groupId>org.apache.hadoop</groupId>
  299. <artifactId>hadoop-annotations</artifactId>
  300. <version>${hadoop.version}</version>
  301. </dependency>
  302. <dependency>
  303. <groupId>org.mockito</groupId>
  304. <artifactId>mockito-all</artifactId>
  305. <version>1.8.5</version>
  306. <scope>test</scope>
  307. </dependency>
  308. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  309. <dependency>
  310. <groupId>org.apache.hadoop</groupId>
  311. <artifactId>hadoop-common</artifactId>
  312. <version>${hadoop.version}</version>
  313. <type>test-jar</type>
  314. <scope>test</scope>
  315. </dependency>
  316. <dependency>
  317. <groupId>com.google.inject.extensions</groupId>
  318. <artifactId>guice-servlet</artifactId>
  319. <version>3.0</version>
  320. </dependency>
  321. <dependency>
  322. <groupId>com.google.protobuf</groupId>
  323. <artifactId>protobuf-java</artifactId>
  324. <version>${protobuf.version}</version>
  325. </dependency>
  326. <dependency>
  327. <groupId>junit</groupId>
  328. <artifactId>junit</artifactId>
  329. <scope>test</scope>
  330. <version>4.10</version>
  331. </dependency>
  332. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  333. <dependency>
  334. <groupId>com.google.inject</groupId>
  335. <artifactId>guice</artifactId>
  336. <version>3.0</version>
  337. </dependency>
  338. <dependency>
  339. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  340. <artifactId>jersey-test-framework-core</artifactId>
  341. <version>1.11</version>
  342. <scope>test</scope>
  343. </dependency>
  344. <dependency>
  345. <groupId>com.sun.jersey</groupId>
  346. <artifactId>jersey-json</artifactId>
  347. <version>1.11</version>
  348. </dependency>
  349. <dependency>
  350. <groupId>com.sun.jersey.contribs</groupId>
  351. <artifactId>jersey-guice</artifactId>
  352. <version>1.11</version>
  353. </dependency>
  354. <dependency>
  355. <groupId>com.sun.jersey</groupId>
  356. <artifactId>jersey-server</artifactId>
  357. <version>1.11</version>
  358. </dependency>
  359. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  360. <dependency>
  361. <groupId>org.apache.hadoop</groupId>
  362. <artifactId>hadoop-yarn-common</artifactId>
  363. <version>${hadoop.version}</version>
  364. <type>test-jar</type>
  365. <scope>test</scope>
  366. </dependency>
  367. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  368. <dependency>
  369. <groupId>org.apache.hadoop</groupId>
  370. <artifactId>hadoop-yarn-common</artifactId>
  371. <version>${hadoop.version}</version>
  372. </dependency>
  373. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  374. <dependency>
  375. <groupId>org.apache.hadoop</groupId>
  376. <artifactId>hadoop-yarn-api</artifactId>
  377. <version>${hadoop.version}</version>
  378. </dependency>
  379. <dependency>
  380. <groupId>javax.xml.bind</groupId>
  381. <artifactId>jaxb-api</artifactId>
  382. <version>2.2.2</version>
  383. </dependency>
  384. <dependency>
  385. <groupId>org.codehaus.jettison</groupId>
  386. <artifactId>jettison</artifactId>
  387. <version>1.1</version>
  388. </dependency>
  389. <dependency>
  390. <groupId>com.sun.jersey</groupId>
  391. <artifactId>jersey-core</artifactId>
  392. <version>1.11</version>
  393. </dependency>
  394. <dependency>
  395. <groupId>com.sun.jersey</groupId>
  396. <artifactId>jersey-client</artifactId>
  397. <version>1.11</version>
  398. </dependency>
  399. <dependency>
  400. <groupId>com.google.guava</groupId>
  401. <artifactId>guava</artifactId>
  402. <version>14.0.1</version>
  403. </dependency>
  404. <dependency>
  405. <groupId>commons-logging</groupId>
  406. <artifactId>commons-logging</artifactId>
  407. <version>1.1.1</version>
  408. </dependency>
  409. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  410. <dependency>
  411. <groupId>org.apache.hadoop</groupId>
  412. <artifactId>hadoop-yarn-server-common</artifactId>
  413. <version>${hadoop.version}</version>
  414. </dependency>
  415. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  416. <dependency>
  417. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  418. <artifactId>jersey-test-framework-grizzly2</artifactId>
  419. <scope>test</scope>
  420. <version>1.11</version>
  421. </dependency>
  422. <dependency>
  423. <groupId>org.codehaus.jackson</groupId>
  424. <artifactId>jackson-core-asl</artifactId>
  425. <version>1.9.9</version>
  426. </dependency>
  427. <dependency>
  428. <groupId>org.slf4j</groupId>
  429. <artifactId>slf4j-api</artifactId>
  430. <version>1.7.2</version>
  431. </dependency>
  432. <dependency>
  433. <groupId>org.slf4j</groupId>
  434. <artifactId>slf4j-log4j12</artifactId>
  435. <version>1.7.2</version>
  436. </dependency>
  437. <dependency>
  438. <groupId>org.codehaus.jackson</groupId>
  439. <artifactId>jackson-mapper-asl</artifactId>
  440. <version>1.9.13</version>
  441. </dependency>
  442. <dependency>
  443. <groupId>commons-collections</groupId>
  444. <artifactId>commons-collections</artifactId>
  445. <version>3.2.1</version>
  446. </dependency>
  447. <dependency>
  448. <groupId>org.fusesource.leveldbjni</groupId>
  449. <artifactId>leveldbjni-all</artifactId>
  450. <version>1.8</version>
  451. </dependency>
  452. <dependency>
  453. <groupId>org.assertj</groupId>
  454. <artifactId>assertj-core</artifactId>
  455. <version>1.7.0</version>
  456. <scope>test</scope>
  457. </dependency>
  458. <dependency>
  459. <groupId>org.easymock</groupId>
  460. <artifactId>easymock</artifactId>
  461. <version>3.2</version>
  462. <scope>test</scope>
  463. </dependency>
  464. <!-- for unit tests only -->
  465. <dependency>
  466. <groupId>org.apache.phoenix</groupId>
  467. <artifactId>phoenix-core</artifactId>
  468. <type>test-jar</type>
  469. <version>${phoenix.version}</version>
  470. <scope>test</scope>
  471. </dependency>
  472. <dependency>
  473. <groupId>org.apache.hbase</groupId>
  474. <artifactId>hbase-it</artifactId>
  475. <version>0.98.4-hadoop2</version>
  476. <scope>test</scope>
  477. <classifier>tests</classifier>
  478. </dependency>
  479. <dependency>
  480. <groupId>org.apache.hbase</groupId>
  481. <artifactId>hbase-testing-util</artifactId>
  482. <version>0.98.4-hadoop2</version>
  483. <scope>test</scope>
  484. <optional>true</optional>
  485. <exclusions>
  486. <exclusion>
  487. <groupId>org.jruby</groupId>
  488. <artifactId>jruby-complete</artifactId>
  489. </exclusion>
  490. </exclusions>
  491. </dependency>
  492. <dependency>
  493. <groupId>org.powermock</groupId>
  494. <artifactId>powermock-module-junit4</artifactId>
  495. <version>1.4.9</version>
  496. <scope>test</scope>
  497. </dependency>
  498. <dependency>
  499. <groupId>org.powermock</groupId>
  500. <artifactId>powermock-api-mockito</artifactId>
  501. <version>1.4.9</version>
  502. <scope>test</scope>
  503. </dependency>
  504. <dependency>
  505. <groupId>org.powermock</groupId>
  506. <artifactId>powermock-api-easymock</artifactId>
  507. <version>1.4.9</version>
  508. <scope>test</scope>
  509. </dependency>
  510. </dependencies>
  511. <profiles>
  512. <profile>
  513. <id>sim</id>
  514. <build>
  515. <plugins>
  516. <plugin>
  517. <artifactId>maven-assembly-plugin</artifactId>
  518. <configuration>
  519. <descriptors>
  520. <descriptor>src/main/assemblies/simulator.xml</descriptor>
  521. </descriptors>
  522. <tarLongFileMode>gnu</tarLongFileMode>
  523. </configuration>
  524. <executions>
  525. <execution>
  526. <id>build-tarball</id>
  527. <phase>package</phase>
  528. <goals>
  529. <goal>single</goal>
  530. </goals>
  531. </execution>
  532. </executions>
  533. </plugin>
  534. <plugin>
  535. <artifactId>maven-jar-plugin</artifactId>
  536. <version>2.3.1</version>
  537. <!-- The configuration of the plugin -->
  538. <configuration>
  539. <!-- Configuration of the archiver -->
  540. <finalName>${pom.artifactId}-simulator-${pom.version}</finalName>
  541. <archive>
  542. <!-- Manifest specific configuration -->
  543. <manifest>
  544. <!-- Classpath is added to the manifest of the created jar file. -->
  545. <addClasspath>true</addClasspath>
  546. <!--
  547. Configures the classpath prefix. This configuration option is
  548. used to specify that all needed libraries are found under lib/
  549. directory.
  550. -->
  551. <classpathPrefix></classpathPrefix>
  552. <!-- Specifies the main class of the application -->
  553. <mainClass>
  554. org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.MetricsLoadSimulator
  555. </mainClass>
  556. </manifest>
  557. </archive>
  558. </configuration>
  559. </plugin>
  560. </plugins>
  561. </build>
  562. </profile>
  563. </profiles>
  564. </project>