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