1
0

pom.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  4. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <!-- Maven Metadatas -->
  7. <groupId>com.github.vspiewak</groupId>
  8. <artifactId>log-generator</artifactId>
  9. <version>0.0.1-SNAPSHOT</version>
  10. <packaging>jar</packaging>
  11. <!-- Project Metadatas -->
  12. <name>log-generator</name>
  13. <description>
  14. A simple log generator
  15. </description>
  16. <url>http://github.com/vspiewak/log-generator</url>
  17. <inceptionYear>2013</inceptionYear>
  18. <organization>
  19. <name>Vincent Spiewak</name>
  20. <url>http://www.github.com/vspiewak</url>
  21. </organization>
  22. <!-- Project Properties -->
  23. <properties>
  24. <java.main.class>com.github.vspiewak.loggenerator.App</java.main.class>
  25. <!-- UTF-8 Encoding for all -->
  26. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  27. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  28. <!-- Dependencies versions -->
  29. <slf4j.version>1.7.5</slf4j.version>
  30. <slf4j.log4j.version>1.7.5</slf4j.log4j.version>
  31. <logback.version>1.0.13</logback.version>
  32. <log4j.version>1.2.17</log4j.version>
  33. <jcommander.version>1.30</jcommander.version>
  34. <junit.version>4.10</junit.version>
  35. <maven.versions>[2.2.1, 3.1.0)</maven.versions>
  36. <java.version>1.6</java.version>
  37. <maven.shade.plugin>2.1</maven.shade.plugin>
  38. <maven.jar.plugin>2.4</maven.jar.plugin>
  39. </properties>
  40. <!-- Team Metadatas -->
  41. <developers>
  42. <!-- A Developer - You can skip some fields... -->
  43. <developer>
  44. <id>vspiewak</id>
  45. <name>Vincent Spiewak</name>
  46. <email>vspiewak+github@gmail.com</email>
  47. <roles>
  48. <role>Admin</role>
  49. <role>Developer</role>
  50. </roles>
  51. <organization>http://github.com/vspiewak</organization>
  52. </developer>
  53. </developers>
  54. <profiles>
  55. <profile>
  56. <id>logback</id>
  57. <activation>
  58. <activeByDefault>true</activeByDefault>
  59. </activation>
  60. <dependencies>
  61. <dependency>
  62. <groupId>ch.qos.logback</groupId>
  63. <artifactId>logback-classic</artifactId>
  64. <version>${logback.version}</version>
  65. <scope>runtime</scope>
  66. </dependency>
  67. </dependencies>
  68. </profile>
  69. <profile>
  70. <id>log4j</id>
  71. <dependencies>
  72. <dependency>
  73. <groupId>org.slf4j</groupId>
  74. <artifactId>slf4j-log4j12</artifactId>
  75. <version>${slf4j.log4j.version}</version>
  76. <scope>runtime</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>log4j</groupId>
  80. <artifactId>log4j</artifactId>
  81. <version>${log4j.version}</version>
  82. <scope>runtime</scope>
  83. </dependency>
  84. </dependencies>
  85. </profile>
  86. </profiles>
  87. <dependencies>
  88. <dependency>
  89. <groupId>org.slf4j</groupId>
  90. <artifactId>slf4j-api</artifactId>
  91. <version>${slf4j.version}</version>
  92. <scope>compile</scope>
  93. </dependency>
  94. <dependency>
  95. <groupId>com.beust</groupId>
  96. <artifactId>jcommander</artifactId>
  97. <version>${jcommander.version}</version>
  98. </dependency>
  99. <dependency>
  100. <groupId>junit</groupId>
  101. <artifactId>junit</artifactId>
  102. <version>${junit.version}</version>
  103. <scope>test</scope>
  104. </dependency>
  105. </dependencies>
  106. <build>
  107. <!-- Build plugins -->
  108. <plugins>
  109. <!-- Maven Compiler -->
  110. <plugin>
  111. <groupId>org.apache.maven.plugins</groupId>
  112. <artifactId>maven-compiler-plugin</artifactId>
  113. <version>2.3.2</version>
  114. <configuration>
  115. <!-- Ensures we are compiling at java.version level -->
  116. <source>${java.version}</source>
  117. <target>${java.version}</target>
  118. <!-- Show Warnings & Deprecations -->
  119. <showWarnings>true</showWarnings>
  120. <showDeprecation>true</showDeprecation>
  121. </configuration>
  122. </plugin>
  123. <!-- Maven Jar -->
  124. <plugin>
  125. <groupId>org.apache.maven.plugins</groupId>
  126. <artifactId>maven-jar-plugin</artifactId>
  127. <version>${maven.jar.plugin}</version>
  128. <configuration>
  129. <archive>
  130. <!-- Add manifest Main-Class entry -->
  131. <manifest>
  132. <mainClass>${java.main.class}</mainClass>
  133. </manifest>
  134. </archive>
  135. </configuration>
  136. </plugin>
  137. <!-- Maven Shade -->
  138. <plugin>
  139. <groupId>org.apache.maven.plugins</groupId>
  140. <artifactId>maven-shade-plugin</artifactId>
  141. <version>${maven.shade.plugin}</version>
  142. <configuration>
  143. <minimizeJar>true</minimizeJar>
  144. </configuration>
  145. <executions>
  146. <execution>
  147. <phase>package</phase>
  148. <goals>
  149. <goal>shade</goal>
  150. </goals>
  151. </execution>
  152. </executions>
  153. </plugin>
  154. <!-- Maven Enforcer -->
  155. <plugin>
  156. <groupId>org.apache.maven.plugins</groupId>
  157. <artifactId>maven-enforcer-plugin</artifactId>
  158. <version>1.0</version>
  159. <executions>
  160. <execution>
  161. <id>enforce</id>
  162. <goals>
  163. <goal>enforce</goal>
  164. </goals>
  165. <configuration>
  166. <!-- Fail the build if a check fail -->
  167. <fail>true</fail>
  168. <!-- Stop on the first check fail -->
  169. <failFast>true</failFast>
  170. <!-- Rules: -->
  171. <rules>
  172. <!-- Check Maven version -->
  173. <requireMavenVersion>
  174. <version>${maven.versions}</version>
  175. </requireMavenVersion>
  176. <!-- Check Java version -->
  177. <requireJavaVersion>
  178. <version>${java.version}</version>
  179. </requireJavaVersion>
  180. <!-- No snapshots Dependencies -->
  181. <requireReleaseDeps>
  182. <message>snapshots dependency found</message>
  183. </requireReleaseDeps>
  184. <!-- Only one version per dependency -->
  185. <dependencyConvergence/>
  186. <!-- No Repositories in pom.xml -->
  187. <requireNoRepositories>
  188. <message><![CDATA[<repositories>...</repositories> defined in pom.xml]]></message>
  189. </requireNoRepositories>
  190. </rules>
  191. </configuration>
  192. </execution>
  193. </executions>
  194. </plugin>
  195. </plugins>
  196. <!-- m2e (Maven integration for Eclipse) requires the following configuration -->
  197. <!-- this avoid m2e warning about enforce goal -->
  198. <pluginManagement>
  199. <plugins>
  200. <plugin>
  201. <groupId>org.eclipse.m2e</groupId>
  202. <artifactId>lifecycle-mapping</artifactId>
  203. <version>1.0.0</version>
  204. <configuration>
  205. <lifecycleMappingMetadata>
  206. <pluginExecutions>
  207. <pluginExecution>
  208. <pluginExecutionFilter>
  209. <groupId>org.apache.maven.plugins</groupId>
  210. <artifactId>maven-enforcer-plugin</artifactId>
  211. <versionRange>[1.0.0,)</versionRange>
  212. <goals>
  213. <goal>enforce</goal>
  214. </goals>
  215. </pluginExecutionFilter>
  216. <action>
  217. <ignore/>
  218. </action>
  219. </pluginExecution>
  220. </pluginExecutions>
  221. </lifecycleMappingMetadata>
  222. </configuration>
  223. </plugin>
  224. </plugins>
  225. </pluginManagement>
  226. </build>
  227. </project>