<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>org.substeps</groupId>
    <artifactId>substeps-framework</artifactId>
    <version>1.1.8</version>
    <packaging>pom</packaging>

    <name>Substeps Framework</name>
    <description>The core project of Substeps</description>
    <url>https://github.com/Substeps/substeps-framework</url>

    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>

    <scm>
        <connection>scm:git:https://github.com:Substeps/substeps-framework.git</connection>
        <developerConnection>scm:git:git@github.com:Substeps/substeps-framework.git</developerConnection>
        <url>https://github.com/Substeps/substeps-framework.git</url>
      <tag>1.1.8</tag>
  </scm>

    <licenses>
        <license>
            <name>LGPL 3.0 license</name>
            <url>http://www.opensource.org/licenses/lgpl-3.0.html</url>
            <distribution>manual</distribution>
        </license>
    </licenses>

    <organization>
        <name>Substeps</name>
        <url>https://github.com/Substeps/</url>
    </organization>


<!--
    Original organization
    <organization>
        <name>Technophobia Ltd</name>
        <url>www.technophobia.com/</url>
    </organization>
-->
    <developers>
        <developer>
            <id>ianmoore</id>
            <name>Ian Moore</name>
            <organization>Substeps</organization>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
        </developer>

        <developer>
            <id>beercan1989</id>
            <name>James Bacon</name>
            <organization>G2G3 Digital</organization>
            <url>https://github.com/beercan1989</url>
            <roles>
                <role>developer</role>
            </roles>
        </developer>

    </developers>

    <contributors>
        <contributor>
            <name>Iain Rawson</name>
            <roles>
                <role>developer</role>
            </roles>
        </contributor>

        <contributor>
            <name>Stu Forbes</name>
            <organization>Technophobia</organization>
            <roles>
                <role>developer</role>
            </roles>
        </contributor>

        <contributor>
            <name>Ricky Barefield</name>
            <organization>Technophobia</organization>
            <roles>
                <role>developer</role>
            </roles>
        </contributor>

        <contributor>
            <name>Rory Gibson</name>
            <organization>Technophobia</organization>
            <roles>
                <role>developer</role>
            </roles>
        </contributor>

        <contributor>
            <name>Peter Phillips</name>
            <organization>Greenthistle.com</organization>
            <roles>
                <role>developer</role>
            </roles>
        </contributor>

        <contributor>
            <name>Dave Moss</name>
            <organization>Technophobia</organization>
            <roles>
                <role>developer</role>
            </roles>
        </contributor>
    </contributors>

    <modules>
        <module>api</module>
        <module>core</module>
        <module>runner</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>11</java.version>

        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <stable.substeps.version>1.0.0-SNAPSHOT</stable.substeps.version>

        <slf4j.version>1.7.26</slf4j.version>

        <junit.version>4.12</junit.version>
        <hamcrest.version>2.1</hamcrest.version>
        <mockito.version>3.0.0</mockito.version>
        <guava.version>28.1-jre</guava.version>
        <gson.version>2.8.2</gson.version>
        <typesafe.config.version>1.3.4</typesafe.config.version>

<!--        <jacoco.version>0.7.6.201602180812</jacoco.version>-->
        <jacoco.version>0.8.4</jacoco.version>

        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>

        <sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
        <scala.major.version>2.12</scala.major.version>
        <scala.version>${scala.major.version}.10</scala.version>

        <json4s.version>3.6.6</json4s.version>
        <scala-test.version>3.0.8</scala-test.version>
        <scala-mock.version>4.4.0</scala-mock.version>
        <!-- Configuration to enable SCM access via Travis-CI -->
        <project.scm.id>scm.credentials</project.scm.id>

        <scala.plugin.version>4.0.2</scala.plugin.version>
        <scoverage.plugin.version>1.3.0</scoverage.plugin.version>

    </properties>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-core-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-core-api</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-core</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-runner-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-glossary-builder</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-junit-runner</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-maven-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.substeps</groupId>
                <artifactId>substeps-ant-runner</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.typesafe</groupId>
                <artifactId>config</artifactId>
                <version>${typesafe.config.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.findbugs</groupId>
                <artifactId>annotations</artifactId>
                <version>1.3.2</version>
            </dependency>

            <!-- Logging Dependencies -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>

            <!-- Test Dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>


            <!-- SCALA -->
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-reflect</artifactId>
                <version>${scala.version}</version>
            </dependency>

            <dependency>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest_${scala.major.version}</artifactId>
                <version>${scala-test.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.scalamock</groupId>
                <artifactId>scalamock_${scala.major.version}</artifactId>
                <version>${scala-mock.version}</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <finalName>${project.artifactId}</finalName>

        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>

                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>

                                        <limit>
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.00</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.scalastyle</groupId>
                <artifactId>scalastyle-maven-plugin</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <verbose>false</verbose>
                    <failOnViolation>true</failOnViolation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <failOnWarning>false</failOnWarning>
                    <sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory>
                    <!--<sourceDirectories>-->
                        <!--<dir>${project.basedir}/api/src/main/scala</dir>-->
                        <!--<dir>${project.basedir}/core/src/main/scala</dir>-->
                        <!--<dir>${project.basedir}/runner/Maven/src/main/scala</dir>-->

                    <!--</sourceDirectories>-->

                    <!--<testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory>-->
                    <configLocation>lib/scalastyle_config.xml</configLocation>
                    <outputFile>${project.build.directory}/scalastyle-output.xml</outputFile>
                    <outputEncoding>UTF-8</outputEncoding>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala.plugin.version}</version>
                    <executions>

                        <!-- Run scala compiler in the process-resources phase, so that dependencies on scala classes can be
                            resolved later in the (Java) compile phase -->
                        <execution>
                            <id>scala-compile-first</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>

                        <!-- Run scala compiler in the process-test-resources phase, so that dependencies on scala classes can
                            be resolved later in the (Java) test-compile phase -->
                        <execution>
                            <id>scala-test-compile</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>

                    </executions>
                    <configuration>
                        <sourceDir>src/main/scala</sourceDir>
                        <jvmArgs>
                            <jvmArg>-Xms64m</jvmArg>
                            <jvmArg>-Xmx1024m</jvmArg>
                        </jvmArgs>
<!--                        <scalaVersion>${scala.version}</scalaVersion>-->
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.scoverage</groupId>
                    <artifactId>scoverage-maven-plugin</artifactId>
                    <version>${scoverage.plugin.version}</version>
                    <configuration>
                        <highlighting>true</highlighting>
                        <aggregate>true</aggregate>

                    </configuration>
                </plugin>

                <!-- this is necessary in order to get sonar to be able to analyse the scala sources -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <sources>
                            <source>${project.basedir}/src/main/scala</source>
                        </sources>
                        <fileSet />
                        <name />
                        <regex />
                        <source />
                        <value />
                    </configuration>
                    <executions>
                        <execution>
                            <id>add-scala-source-folder</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>

                        </execution>

                    </executions>

                </plugin>


                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>

                    <configuration>
                        <release>11</release>
                        <encoding>${project.build.sourceEncoding}</encoding>

                        <compilerArgs>
                            <arg>-J-XaddExports:jdk.compiler/com.sun.source.util=ALL-UNNAMED</arg>
                            <arg>-J-XaddExports:jdk.compiler/com.sun.source.doctree=ALL-UNNAMED</arg>
                            <arg>-J-XaddExports:jdk.javadoc/jdk.javadoc.doclet=ALL-UNNAMED</arg>
                        </compilerArgs>

                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.7</version>

                    <extensions>true</extensions>
                    <configuration>

                        <serverId>oss.sonatype.org</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <tags>
                            <javaVersion>r${java.version}</javaVersion>
                        </tags>

                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>

                    <configuration>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                        <pushChanges>false</pushChanges>
                        <localCheckout>true</localCheckout>

                        <!-- TODO: Add Travis-CI configuration for SCM access -->
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-component-metadata</artifactId>
                    <version>1.6</version>

                    <executions>
                        <execution>
                            <id>generate-metadata</id>
                            <goals>
                                <goal>generate-metadata</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Just Version Configuration -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>

                    <configuration>
                        <argLine>
                            --illegal-access=permit
                        </argLine>
                    </configuration>

                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.3.0.603</version>
                    <!--<version>3.4-SNAPSHOT</version>-->
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.10</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.8.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.4</version>
                </plugin>


                <plugin>
                    <groupId>org.scalatest</groupId>
                    <artifactId>scalatest-maven-plugin</artifactId>
                    <version>2.0.0</version>
                    <configuration>
                        <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
                        <junitxml>.</junitxml>
                        <filereports>WDF TestSuite.txt</filereports>
                    </configuration>
                    <executions><execution>
                        <id>test</id>
                        <goals><goal>test</goal></goals>
                    </execution></executions>
                </plugin>



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

    <profiles>

        <profile>
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco.version}</version>

                    <executions>
                        <execution>
                            <id>default-prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                    </plugin>


                </plugins>

                <pluginManagement>
                    <plugins>


                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>

                            <configuration>
                                <release>11</release>
                            </configuration>
                        </plugin>

                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Release Configuration -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>
                        <configuration>
                            <source>11</source>
                        </configuration>
                        <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>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
