pom.xml 19 KB

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