pom.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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.0.0-2557</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. <plugin>
  136. <groupId>org.vafer</groupId>
  137. <artifactId>jdeb</artifactId>
  138. <version>1.0.1</version>
  139. <executions>
  140. <execution>
  141. <!--Stub execution on direct plugin call - workaround for ambari deb build process-->
  142. <id>stub-execution</id>
  143. <phase>none</phase>
  144. <goals>
  145. <goal>jdeb</goal>
  146. </goals>
  147. </execution>
  148. </executions>
  149. <configuration>
  150. <skip>true</skip>
  151. <attach>false</attach>
  152. <submodules>false</submodules>
  153. <controlDir>${project.basedir}/../src/main/package/deb/control</controlDir>
  154. </configuration>
  155. </plugin>
  156. </plugins>
  157. </build>
  158. <dependencies>
  159. <dependency>
  160. <groupId>org.apache.commons</groupId>
  161. <artifactId>commons-lang3</artifactId>
  162. <version>3.3.2</version>
  163. </dependency>
  164. <dependency>
  165. <groupId>commons-codec</groupId>
  166. <artifactId>commons-codec</artifactId>
  167. <version>1.8</version>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.apache.storm</groupId>
  171. <artifactId>storm-core</artifactId>
  172. <version>${storm.version}</version>
  173. <scope>compile</scope>
  174. </dependency>
  175. <dependency>
  176. <groupId>org.apache.ambari</groupId>
  177. <artifactId>ambari-metrics-common</artifactId>
  178. <version>${project.version}</version>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.codehaus.jackson</groupId>
  182. <artifactId>jackson-mapper-asl</artifactId>
  183. <version>1.9.13</version>
  184. </dependency>
  185. <dependency>
  186. <groupId>junit</groupId>
  187. <artifactId>junit</artifactId>
  188. <scope>test</scope>
  189. <version>4.10</version>
  190. </dependency>
  191. <dependency>
  192. <groupId>org.easymock</groupId>
  193. <artifactId>easymock</artifactId>
  194. <version>3.2</version>
  195. <scope>test</scope>
  196. </dependency>
  197. <dependency>
  198. <groupId>org.powermock</groupId>
  199. <artifactId>powermock-api-easymock</artifactId>
  200. <scope>test</scope>
  201. </dependency>
  202. <dependency>
  203. <groupId>org.powermock</groupId>
  204. <artifactId>powermock-module-junit4</artifactId>
  205. <scope>test</scope>
  206. </dependency>
  207. </dependencies>
  208. </project>