1
0

pom.xml 9.7 KB

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