<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>dev.tidalcode</groupId>
    <artifactId>cukes</artifactId>
    <version>1.1.0</version>

    <name>Tidal Cucumber Support</name>
    <description>Cucumber Support for Tidal Framework</description>
    <url>https://github.com/tidal-code/cukes</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Philip Kurian</name>
            <email>hits.sentry.0e@icloud.com</email>
            <organization>Tidal-Code</organization>
            <organizationUrl>https://github.com/tidal-code</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/tidal-code/cukes.git</connection>
        <developerConnection>scm:git:ssh://github.com/tidal-code/cukes.git</developerConnection>
        <url>//github.com/tidal-code/cuckes.git</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>11</java.version>
        <maven-surefire-plugin>3.2.1</maven-surefire-plugin>
        <maven-compiler-plugin>3.8.1</maven-compiler-plugin>
        <maven.surefire.plugin.version>3.0.0-M4</maven.surefire.plugin.version>
        <cucumber-version>7.14.0</cucumber-version>
        <slf4j.version>2.0.6</slf4j.version>
        <aspectj.version>1.9.1</aspectj.version>
        <parallelSessions>4</parallelSessions>
        <tagName>@add</tagName>
        <tagNameTwo>@add</tagNameTwo>
        <tagNameThree>@add</tagNameThree>
        <ignoreTag>@ignore</ignoreTag>
        <ignoreTagTwo>@ignore</ignoreTagTwo>
        <wipTag>@wip</wipTag>
        <dryRun>false</dryRun>
        <runner>TestNgRunner</runner>
    </properties>

    <dependencies>
        <dependency>
            <groupId>dev.tidalcode</groupId>
            <artifactId>stream</artifactId>
            <version>0.0.5</version>
        </dependency>
        <dependency>
            <groupId>dev.tidalcode</groupId>
            <artifactId>wave</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>dev.tidalcode</groupId>
            <artifactId>utils</artifactId>
            <version>0.0.9</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber-version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>${cucumber-version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>${cucumber-version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin}</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.6.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <deploymentName>Cukes</deploymentName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <includes>
                        <include>**/${runner}*.*</include>
                    </includes>
                    <testFailureIgnore>true</testFailureIgnore>
                    <argLine>
                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                        -Dcucumber.plugin="io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm, pretty,
                        junit:target/junit-reports/${runner}.xml"
                        -Dcucumber.filter.tags="(${tagName} or ${tagNameTwo} or ${tagNameThree}) and not (${ignoreTag}
                        or ${wipTag})"
                        -Dcucumber.execution.dry-run=${dryRun}
                    </argLine>
                    <systemProperties>
                        <property>
                            <name>parallel</name>
                            <value>methods</value>
                        </property>
                        <property>
                            <name>perCoreThreadCount</name>
                            <value>false</value>
                        </property>
                        <property>
                            <name>dataproviderthreadcount</name>
                            <value>${parallelSessions}</value>
                        </property>
                        <property>
                            <name>allure.results.directory</name>
                            <value>${basedir}/target/allure-results</value>
                        </property>
                    </systemProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>