pom.xml 20 KB

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