|
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 2 | + <modelVersion>4.0.0</modelVersion> |
| 3 | + |
| 4 | + <parent> |
| 5 | + <groupId>info.cukes</groupId> |
| 6 | + <artifactId>cucumber-jvm</artifactId> |
| 7 | + <relativePath>../../pom.xml</relativePath> |
| 8 | + <version>1.1.3-SNAPSHOT</version> |
| 9 | + </parent> |
| 10 | + |
| 11 | + <artifactId>cucumber-scala_2.9.2</artifactId> |
| 12 | + <packaging>jar</packaging> |
| 13 | + <name>Cucumber-JVM: Scala (2.9.2)</name> |
| 14 | + |
| 15 | + <dependencies> |
| 16 | + <dependency> |
| 17 | + <groupId>info.cukes</groupId> |
| 18 | + <artifactId>cucumber-core</artifactId> |
| 19 | + </dependency> |
| 20 | + <dependency> |
| 21 | + <groupId>info.cukes</groupId> |
| 22 | + <artifactId>cucumber-jvm-deps</artifactId> |
| 23 | + <scope>provided</scope> |
| 24 | + </dependency> |
| 25 | + <dependency> |
| 26 | + <groupId>info.cukes</groupId> |
| 27 | + <artifactId>gherkin</artifactId> |
| 28 | + <scope>provided</scope> |
| 29 | + </dependency> |
| 30 | + <dependency> |
| 31 | + <groupId>org.scala-lang</groupId> |
| 32 | + <artifactId>scala-compiler</artifactId> |
| 33 | + <version>2.9.2</version> |
| 34 | + <scope>provided</scope> |
| 35 | + </dependency> |
| 36 | + |
| 37 | + <dependency> |
| 38 | + <groupId>info.cukes</groupId> |
| 39 | + <artifactId>cucumber-junit</artifactId> |
| 40 | + <scope>test</scope> |
| 41 | + </dependency> |
| 42 | + <dependency> |
| 43 | + <groupId>org.scala-lang</groupId> |
| 44 | + <artifactId>scala-library</artifactId> |
| 45 | + <version>2.9.2</version> |
| 46 | + <scope>test</scope> |
| 47 | + </dependency> |
| 48 | + <dependency> |
| 49 | + <groupId>junit</groupId> |
| 50 | + <artifactId>junit</artifactId> |
| 51 | + <scope>test</scope> |
| 52 | + </dependency> |
| 53 | + <dependency> |
| 54 | + <groupId>net.sourceforge.cobertura</groupId> |
| 55 | + <artifactId>cobertura</artifactId> |
| 56 | + <scope>test</scope> |
| 57 | + </dependency> |
| 58 | + </dependencies> |
| 59 | + |
| 60 | + <build> |
| 61 | + <sourceDirectory>../src/main/scala</sourceDirectory> |
| 62 | + <testSourceDirectory>../src/test/scala</testSourceDirectory> |
| 63 | + <testResources> |
| 64 | + <testResource> |
| 65 | + <directory>../src/test/resources</directory> |
| 66 | + </testResource> |
| 67 | + </testResources> |
| 68 | + |
| 69 | + <plugins> |
| 70 | + <plugin> |
| 71 | + <groupId>net.alchim31.maven</groupId> |
| 72 | + <artifactId>scala-maven-plugin</artifactId> |
| 73 | + <version>3.1.0</version> |
| 74 | + <configuration> |
| 75 | + <!--encoding>UTF-8</encoding--> |
| 76 | + <excludes> |
| 77 | + <exclude>**/*.java</exclude> |
| 78 | + </excludes> |
| 79 | + </configuration> |
| 80 | + <executions> |
| 81 | + <execution> |
| 82 | + <id>regular-source-compilation</id> |
| 83 | + <goals> |
| 84 | + <goal>add-source</goal> |
| 85 | + <goal>compile</goal> |
| 86 | + <goal>testCompile</goal> |
| 87 | + </goals> |
| 88 | + </execution> |
| 89 | + <execution> |
| 90 | + <goals> |
| 91 | + <goal>add-source</goal> |
| 92 | + </goals> |
| 93 | + <configuration> |
| 94 | + <sourceDir>${basedir}/target/generated-sources/i18n</sourceDir> |
| 95 | + </configuration> |
| 96 | + </execution> |
| 97 | + <execution> |
| 98 | + <id>attach-javadocs</id> |
| 99 | + <goals> |
| 100 | + <goal>doc-jar</goal> |
| 101 | + </goals> |
| 102 | + </execution> |
| 103 | + </executions> |
| 104 | + </plugin> |
| 105 | + |
| 106 | + <plugin> |
| 107 | + <groupId>org.apache.maven.plugins</groupId> |
| 108 | + <artifactId>maven-antrun-plugin</artifactId> |
| 109 | + <executions> |
| 110 | + <execution> |
| 111 | + <id>generate-i18n-sources</id> |
| 112 | + <goals> |
| 113 | + <goal>run</goal> |
| 114 | + </goals> |
| 115 | + <phase>generate-sources</phase> |
| 116 | + <configuration> |
| 117 | + <target> |
| 118 | + <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="maven.plugin.classpath" /> |
| 119 | + |
| 120 | + <groovy><![CDATA[ |
| 121 | +import groovy.text.SimpleTemplateEngine |
| 122 | +
|
| 123 | +def engine = new SimpleTemplateEngine() |
| 124 | +def templateSource = new File(project.baseDir.parentFile, "src${File.separator}main${File.separator}code_generator${File.separator}I18n.scala.txt").getText() |
| 125 | +
|
| 126 | +template = engine.createTemplate(templateSource).make(null) |
| 127 | +def file = new File(project.baseDir, "target${File.separator}generated-sources${File.separator}i18n${File.separator}cucumber${File.separator}api${File.separator}scala${File.separator}I18n.scala") |
| 128 | +file.parentFile.mkdirs() |
| 129 | +file.write(template.toString(), "UTF-8") |
| 130 | + ]]></groovy> |
| 131 | + |
| 132 | + </target> |
| 133 | + </configuration> |
| 134 | + </execution> |
| 135 | + </executions> |
| 136 | + </plugin> |
| 137 | + </plugins> |
| 138 | + </build> |
| 139 | +</project> |
0 commit comments