<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>
    <artifactId>cucumber-jvm-scala</artifactId>
    <version>5.7.0</version>
    <packaging>pom</packaging>
    <name>Cucumber-JVM: Scala</name>
    <description>Cucumber for Scala</description>
    <url>http://cucumber.io/</url>

    <parent>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-parent</artifactId>
        <version>2.1.0</version>
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.Automatic-Module-Name>io.cucumber.scala</project.Automatic-Module-Name>
        <minimum.maven.version>3.3</minimum.maven.version>
        <outputDirectory>${project.build.directory}</outputDirectory>
        <scala-maven-plugin.version>3.4.6</scala-maven-plugin.version>
        <build-helper-maven-plugin.version>3.1.0</build-helper-maven-plugin.version>
        <cucumber.version>5.7.0</cucumber.version>
        <gherkin.version>9.2.0</gherkin.version>
        <groovy.version>2.4.19</groovy.version>
        <jackson-databind.version>2.10.3</jackson-databind.version>
        <junit.version>4.13</junit.version>
        <scala.2.11.version>2.11.12</scala.2.11.version>
        <scala.2.12.version>2.12.11</scala.2.12.version>
        <scala.2.13.version>2.13.2</scala.2.13.version>
        <mockito-scala.version>1.13.9</mockito-scala.version>
        <toolchain.vendor>openjdk</toolchain.vendor>
        <toolchain.java.version>8</toolchain.java.version>
    </properties>

    <scm>
        <connection>scm:git:git://github.com/cucumber/cucumber-jvm-scala.git</connection>
        <developerConnection>scm:git:git@github.com:cucumber/cucumber-jvm-scala.git</developerConnection>
        <url>git://github.com/cucumber/cucumber-jvm-scala.git</url>
        <tag>v5.7.0</tag>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-core</artifactId>
                <version>${cucumber.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson-databind.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-scala_2.11</artifactId>
                <version>${jackson-databind.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-scala_2.12</artifactId>
                <version>${jackson-databind.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-scala_2.13</artifactId>
                <version>${jackson-databind.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-junit</artifactId>
                <version>${cucumber.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>scala</module>
    </modules>

    <profiles>
        <profile>
            <id>examples</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>examples</module>
            </modules>
        </profile>

        <profile>
            <id>coveralls.io</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>${cobertura-maven-plugin.version}</version>
                            <configuration>
                                <formats>
                                    <format>xml</format>
                                </formats>

                                <aggregate>true</aggregate>
                                <instrumentation>
                                    <ignoreTrivial>true</ignoreTrivial>
                                </instrumentation>
                                <check />
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.eluder.coveralls</groupId>
                            <artifactId>coveralls-maven-plugin</artifactId>
                            <version>4.3.0</version>
                            <configuration>
                                <sourceDirectories>
                                    <sourceDirectory>${basedir}/scala/scala_2.11/target/generated-sources/i18n
                                    </sourceDirectory>
                                    <sourceDirectory>${basedir}/scala/scala_2.12/target/generated-sources/i18n
                                    </sourceDirectory>
                                    <sourceDirectory>${basedir}/scala/scala_2.13/target/generated-sources/i18n
                                    </sourceDirectory>
                                </sourceDirectories>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>${toolchain.java.version}</version>
                            <vendor>${toolchain.vendor}</vendor>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.groovy</groupId>
                            <artifactId>groovy-all</artifactId>
                            <version>${groovy.version}</version>
                        </dependency>
                        <!--
                        Gherkin is used during build time to generate code. We add it to the plugin classpath to prevent polluting
                        the compile/test classpaths.
                        -->
                        <dependency>
                            <groupId>io.cucumber</groupId>
                            <artifactId>gherkin</artifactId>
                            <version>${gherkin.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <use>false</use>
                        <excludePackageNames>cucumber.runtime,cucumber.runtime.*</excludePackageNames>
                        <links>
                            <link>http://docs.oracle.com/javase/7/docs/api/</link>
                            <link>http://junit.sourceforge.net/javadoc/</link>
                        </links>
                        <groups>
                            <group>
                                <title>Main API Packages</title>
                                <packages>cucumber.api:cucumber.api.*</packages>
                            </group>
                            <group>
                                <title>I18n - Java</title>
                                <packages>cucumber.api.java.*</packages>
                            </group>
                        </groups>
                        <!-- Won't work for children, but works for top level javadoc:aggregate. Good enough. -->
                        <!--<stylesheetfile>${basedir}/doc/javadoc.css</stylesheetfile>-->
                        <stylesheet>java</stylesheet>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <shadedArtifactAttached>true</shadedArtifactAttached>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                </plugin>

                <!-- Non-standard plugins -->
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala-maven-plugin.version}</version>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>
</project>
