<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-jvm-scala</artifactId>
        <version>5.7.0</version>
    </parent>

    <artifactId>cucumber-scala-aggregator</artifactId>
    <packaging>pom</packaging>
    <name>Cucumber-JVM: Scala Aggregator</name>

    <modules>
        <module>scala_2.11</module>
	    <module>scala_2.12</module>
        <module>scala_2.13</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>regular-source-compilation</id>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sourceDir>${basedir}/target/generated-sources/i18n</sourceDir>
                            </configuration>
                        </execution>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>doc-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>generate-i18n-sources</id>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <phase>generate-sources</phase>
                            <configuration>
                                <target>
                                    <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="maven.plugin.classpath" />
                                    <groovy src="../sources/src/main/groovy/generate-i18n-dsl.groovy" />
                                </target>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
