<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>com.intuit.karate</groupId>
        <artifactId>karate-parent</artifactId>
        <version>1.4.0</version>
    </parent>
    <artifactId>karate-gatling</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.gatling.highcharts</groupId>
            <artifactId>gatling-charts-highcharts</artifactId>
            <version>3.7.4</version>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-codec-http</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.13.9</version>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <!-- <testSourceDirectory>src/test/scala</testSourceDirectory> -->
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>src/test/scala</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                    <exclude>**/*.scala</exclude>
                </excludes>
            </testResource>
        </testResources>        
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>4.5.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <args>
                                <arg>-Jbackend:GenBCode</arg>
                                <arg>-Jdelambdafy:method</arg>
                                <arg>-target:jvm-1.8</arg>
                                <arg>-deprecation</arg>
                                <arg>-feature</arg>
                                <arg>-unchecked</arg>
                                <arg>-language:implicitConversions</arg>
                                <arg>-language:postfixOps</arg>
                            </args>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.gatling</groupId>
                <artifactId>gatling-maven-plugin</artifactId>
                <version>4.2.9</version>
                <configuration>
                    <disableCompiler>true</disableCompiler>
                    <skip>${skipTests}</skip>
                    <runMultipleSimulations>true</runMultipleSimulations>
                </configuration>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>                
            </plugin>
        </plugins>
    </build>

</project>
