pom.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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-hadoop-sink</artifactId>
  27. <version>0.1.0-SNAPSHOT</version>
  28. <packaging>jar</packaging>
  29. <properties>
  30. <sinkJarName>${project.artifactId}-with-common-${project.version}.jar</sinkJarName>
  31. </properties>
  32. <build>
  33. <plugins>
  34. <plugin>
  35. <artifactId>maven-assembly-plugin</artifactId>
  36. <executions>
  37. <execution>
  38. <configuration>
  39. <descriptors>
  40. <descriptor>src/main/assemblies/jar-with-common.xml</descriptor>
  41. </descriptors>
  42. <attach>false</attach>
  43. <tarLongFileMode>gnu</tarLongFileMode>
  44. <appendAssemblyId>false</appendAssemblyId>
  45. <finalName>${project.artifactId}-with-common-${project.version}</finalName>
  46. </configuration>
  47. <id>build-jar</id>
  48. <phase>package</phase>
  49. <goals>
  50. <goal>single</goal>
  51. </goals>
  52. </execution>
  53. </executions>
  54. </plugin>
  55. <plugin>
  56. <artifactId>maven-compiler-plugin</artifactId>
  57. <version>3.0</version>
  58. </plugin>
  59. <plugin>
  60. <groupId>org.codehaus.mojo</groupId>
  61. <artifactId>build-helper-maven-plugin</artifactId>
  62. <version>1.8</version>
  63. <executions>
  64. <execution>
  65. <id>parse-version</id>
  66. <phase>validate</phase>
  67. <goals>
  68. <goal>parse-version</goal>
  69. </goals>
  70. </execution>
  71. <execution>
  72. <id>regex-property</id>
  73. <goals>
  74. <goal>regex-property</goal>
  75. </goals>
  76. <configuration>
  77. <name>ambariVersion</name>
  78. <value>${project.version}</value>
  79. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  80. <replacement>$1.$2.$3</replacement>
  81. <failIfNoMatch>false</failIfNoMatch>
  82. </configuration>
  83. </execution>
  84. </executions>
  85. </plugin>
  86. <plugin>
  87. <groupId>com.github.goldin</groupId>
  88. <artifactId>copy-maven-plugin</artifactId>
  89. <version>0.2.5</version>
  90. <executions>
  91. <execution>
  92. <id>create-archive</id>
  93. <phase>none</phase>
  94. </execution>
  95. </executions>
  96. </plugin>
  97. <!--<plugin>-->
  98. <!--<groupId>org.codehaus.mojo</groupId>-->
  99. <!--<artifactId>rpm-maven-plugin</artifactId>-->
  100. <!--<version>2.0.1</version>-->
  101. <!--<executions>-->
  102. <!--<execution>-->
  103. <!--<phase>none</phase>-->
  104. <!--<goals>-->
  105. <!--<goal>rpm</goal>-->
  106. <!--</goals>-->
  107. <!--</execution>-->
  108. <!--</executions>-->
  109. <!--<configuration>-->
  110. <!--<name>ambari-metrics-hadoop-sink</name>-->
  111. <!--<copyright>2012, Apache Software Foundation</copyright>-->
  112. <!--<group>Development</group>-->
  113. <!--<description>Maven Recipe: RPM Package.</description>-->
  114. <!--<defaultDirmode>755</defaultDirmode>-->
  115. <!--<defaultFilemode>644</defaultFilemode>-->
  116. <!--<defaultUsername>root</defaultUsername>-->
  117. <!--<defaultGroupname>root</defaultGroupname>-->
  118. <!--<postinstallScriptlet>-->
  119. <!--<scriptFile>${project.build.outputDirectory}/rpm/postinstall.sh</scriptFile>-->
  120. <!--<fileEncoding>utf-8</fileEncoding>-->
  121. <!--</postinstallScriptlet>-->
  122. <!--<mappings>-->
  123. <!--<mapping>-->
  124. <!--<directory>/usr/lib/ambari-metrics-hadoop-sink</directory>-->
  125. <!--<sources>-->
  126. <!--<source>-->
  127. <!--<location>target/${project.artifactId}-with-common-${project.version}.jar</location>-->
  128. <!--</source>-->
  129. <!--</sources>-->
  130. <!--</mapping>-->
  131. <!--</mappings>-->
  132. <!--</configuration>-->
  133. <!--</plugin>-->
  134. </plugins>
  135. <resources>
  136. <resource>
  137. <directory>src/main/package</directory>
  138. <filtering>true</filtering>
  139. </resource>
  140. </resources>
  141. </build>
  142. <dependencies>
  143. <dependency>
  144. <groupId>org.apache.ambari</groupId>
  145. <artifactId>ambari-metrics-common</artifactId>
  146. <version>${project.version}</version>
  147. </dependency>
  148. <dependency>
  149. <groupId>org.apache.hadoop</groupId>
  150. <artifactId>hadoop-common</artifactId>
  151. <version>2.4.0</version>
  152. <scope>compile</scope>
  153. </dependency>
  154. <dependency>
  155. <groupId>commons-httpclient</groupId>
  156. <artifactId>commons-httpclient</artifactId>
  157. <version>3.1</version>
  158. <scope>compile</scope>
  159. </dependency>
  160. <dependency>
  161. <groupId>commons-codec</groupId>
  162. <artifactId>commons-codec</artifactId>
  163. <version>1.8</version>
  164. <scope>compile</scope>
  165. </dependency>
  166. <dependency>
  167. <groupId>commons-io</groupId>
  168. <artifactId>commons-io</artifactId>
  169. <version>2.1</version>
  170. <scope>compile</scope>
  171. </dependency>
  172. <dependency>
  173. <groupId>commons-collections</groupId>
  174. <artifactId>commons-collections</artifactId>
  175. <version>3.2.1</version>
  176. <scope>compile</scope>
  177. </dependency>
  178. <dependency>
  179. <groupId>commons-logging</groupId>
  180. <artifactId>commons-logging</artifactId>
  181. <version>1.1.1</version>
  182. </dependency>
  183. <dependency>
  184. <groupId>commons-configuration</groupId>
  185. <artifactId>commons-configuration</artifactId>
  186. <version>1.6</version>
  187. <scope>compile</scope>
  188. </dependency>
  189. <dependency>
  190. <groupId>junit</groupId>
  191. <artifactId>junit</artifactId>
  192. <scope>test</scope>
  193. <version>4.10</version>
  194. </dependency>
  195. <dependency>
  196. <groupId>org.easymock</groupId>
  197. <artifactId>easymock</artifactId>
  198. <version>3.2</version>
  199. <scope>test</scope>
  200. </dependency>
  201. </dependencies>
  202. </project>