pom.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. <groupId>com.garypaduana</groupId>
  7. <artifactId>groovy-tools</artifactId>
  8. <version>0.9.0</version>
  9. <packaging>jar</packaging>
  10. <properties>
  11. <start-class/>
  12. </properties>
  13. <dependencies>
  14. <dependency>
  15. <groupId>org.codehaus.groovy</groupId>
  16. <artifactId>groovy-all</artifactId>
  17. <version>2.5.7</version>
  18. <type>pom</type>
  19. </dependency>
  20. <dependency>
  21. <groupId>org.yaml</groupId>
  22. <artifactId>snakeyaml</artifactId>
  23. <version>1.18</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>com.sun.mail</groupId>
  27. <artifactId>jakarta.mail</artifactId>
  28. <version>1.6.3</version>
  29. <scope>provided</scope>
  30. </dependency>
  31. <dependency>
  32. <groupId>org.spockframework</groupId>
  33. <artifactId>spock-core</artifactId>
  34. <version>1.3-groovy-2.5</version>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>junit</groupId>
  39. <artifactId>junit</artifactId>
  40. <version>4.12</version>
  41. <scope>test</scope>
  42. </dependency>
  43. </dependencies>
  44. <build>
  45. <plugins>
  46. <!--
  47. The current maven implementation:
  48. http://docs.groovy-lang.org/latest/html/documentation/tools-groovyc.html#_maven_integration
  49. Alternative solution: https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin
  50. -->
  51. <plugin>
  52. <artifactId>maven-antrun-plugin</artifactId>
  53. <executions>
  54. <execution>
  55. <id>compile</id>
  56. <phase>compile</phase>
  57. <configuration>
  58. <tasks>
  59. <mkdir dir="${basedir}/src/main/groovy"/>
  60. <taskdef name="groovyc"
  61. classname="org.codehaus.groovy.ant.Groovyc">
  62. <classpath refid="maven.compile.classpath"/>
  63. </taskdef>
  64. <mkdir dir="${project.build.outputDirectory}"/>
  65. <groovyc destdir="${project.build.outputDirectory}"
  66. srcdir="${basedir}/src/main/groovy/" listfiles="true">
  67. <classpath refid="maven.compile.classpath"/>
  68. </groovyc>
  69. </tasks>
  70. </configuration>
  71. <goals>
  72. <goal>run</goal>
  73. </goals>
  74. </execution>
  75. <execution>
  76. <id>test-compile</id>
  77. <phase>test-compile</phase>
  78. <configuration>
  79. <tasks>
  80. <mkdir dir="${basedir}/src/test/groovy"/>
  81. <taskdef name="groovyc"
  82. classname="org.codehaus.groovy.ant.Groovyc">
  83. <classpath refid="maven.test.classpath"/>
  84. </taskdef>
  85. <mkdir dir="${project.build.testOutputDirectory}"/>
  86. <groovyc destdir="${project.build.testOutputDirectory}"
  87. srcdir="${basedir}/src/test/groovy/" listfiles="true">
  88. <classpath refid="maven.test.classpath"/>
  89. </groovyc>
  90. </tasks>
  91. </configuration>
  92. <goals>
  93. <goal>run</goal>
  94. </goals>
  95. </execution>
  96. </executions>
  97. </plugin>
  98. <plugin>
  99. <groupId>org.apache.maven.plugins</groupId>
  100. <artifactId>maven-shade-plugin</artifactId>
  101. <version>3.2.1</version>
  102. <executions>
  103. <execution>
  104. <phase>package</phase>
  105. <goals>
  106. <goal>shade</goal>
  107. </goals>
  108. <configuration>
  109. <transformers>
  110. <transformer
  111. implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  112. <mainClass>${start-class}</mainClass>
  113. </transformer>
  114. </transformers>
  115. </configuration>
  116. </execution>
  117. </executions>
  118. </plugin>
  119. </plugins>
  120. </build>
  121. </project>