pom.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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-storm-sink</artifactId>
  27. <version>2.0.0-SNAPSHOT</version>
  28. <name>Ambari Metrics Storm Sink</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <!--<storm.version>0.9.3.2.2.1.0-2340</storm.version>-->
  32. <storm.version>0.10.0.2.3.2.0-2766</storm.version>
  33. </properties>
  34. <build>
  35. <plugins>
  36. <plugin>
  37. <artifactId>maven-compiler-plugin</artifactId>
  38. <version>3.0</version>
  39. </plugin>
  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. <groupId>com.github.goldin</groupId>
  69. <artifactId>copy-maven-plugin</artifactId>
  70. <version>0.2.5</version>
  71. <executions>
  72. <execution>
  73. <id>create-archive</id>
  74. <phase>none</phase>
  75. </execution>
  76. </executions>
  77. </plugin>
  78. <plugin>
  79. <groupId>org.apache.maven.plugins</groupId>
  80. <artifactId>maven-shade-plugin</artifactId>
  81. <version>2.2</version>
  82. <executions>
  83. <execution>
  84. <phase>package</phase>
  85. <goals>
  86. <goal>shade</goal>
  87. </goals>
  88. </execution>
  89. </executions>
  90. <configuration>
  91. <outputFile>${project.build.directory}/${project.artifactId}-with-common-${project.version}.jar</outputFile>
  92. <minimizeJar>false</minimizeJar>
  93. <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
  94. <artifactSet>
  95. <includes>
  96. <include>org.apache.ambari:ambari-metrics-common</include>
  97. <include>org.codehaus.jackson:jackson-mapper-asl</include>
  98. <include>org.codehaus.jackson:jackson-core-asl</include>
  99. <include>org.codehaus.jackson:jackson-xc</include>
  100. <include>org.apache.hadoop:hadoop-annotations</include>
  101. <include>commons-httpclient:commons-httpclient</include>
  102. <include>commons-logging:commons-logging</include>
  103. <include>org.apache.commons:commons-lang3</include>
  104. <include>commons-codec:commons-codec</include>
  105. </includes>
  106. </artifactSet>
  107. <relocations>
  108. <relocation>
  109. <pattern>org.apache.commons.logging</pattern>
  110. <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.logging</shadedPattern>
  111. </relocation>
  112. <relocation>
  113. <pattern>org.apache.commons.httpclient</pattern>
  114. <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.httpclient</shadedPattern>
  115. </relocation>
  116. <relocation>
  117. <pattern>org.apache.hadoop.classification</pattern>
  118. <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.hadoop.classification</shadedPattern>
  119. </relocation>
  120. <relocation>
  121. <pattern>org.codehaus.jackson</pattern>
  122. <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.jackson</shadedPattern>
  123. </relocation>
  124. <relocation>
  125. <pattern>org.apache.commons.lang3</pattern>
  126. <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.lang3</shadedPattern>
  127. </relocation>
  128. <relocation>
  129. <pattern>org.apache.commons.codec</pattern>
  130. <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.codec</shadedPattern>
  131. </relocation>
  132. </relocations>
  133. </configuration>
  134. </plugin>
  135. </plugins>
  136. </build>
  137. <dependencies>
  138. <dependency>
  139. <groupId>org.apache.commons</groupId>
  140. <artifactId>commons-lang3</artifactId>
  141. <version>3.3.2</version>
  142. </dependency>
  143. <dependency>
  144. <groupId>commons-codec</groupId>
  145. <artifactId>commons-codec</artifactId>
  146. <version>1.8</version>
  147. </dependency>
  148. <dependency>
  149. <groupId>org.apache.storm</groupId>
  150. <artifactId>storm-core</artifactId>
  151. <version>${storm.version}</version>
  152. <scope>compile</scope>
  153. </dependency>
  154. <dependency>
  155. <groupId>org.apache.ambari</groupId>
  156. <artifactId>ambari-metrics-common</artifactId>
  157. <version>${project.version}</version>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.codehaus.jackson</groupId>
  161. <artifactId>jackson-mapper-asl</artifactId>
  162. <version>1.9.13</version>
  163. </dependency>
  164. <dependency>
  165. <groupId>junit</groupId>
  166. <artifactId>junit</artifactId>
  167. <scope>test</scope>
  168. <version>4.10</version>
  169. </dependency>
  170. <dependency>
  171. <groupId>org.easymock</groupId>
  172. <artifactId>easymock</artifactId>
  173. <version>3.2</version>
  174. <scope>test</scope>
  175. </dependency>
  176. <dependency>
  177. <groupId>org.powermock</groupId>
  178. <artifactId>powermock-api-easymock</artifactId>
  179. <scope>test</scope>
  180. </dependency>
  181. <dependency>
  182. <groupId>org.powermock</groupId>
  183. <artifactId>powermock-module-junit4</artifactId>
  184. <scope>test</scope>
  185. </dependency>
  186. </dependencies>
  187. </project>