<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (c) 2015-2020 TraceTronic GmbH

  SPDX-License-Identifier: BSD-3-Clause
  -->
<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>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>3.56</version>
        <relativePath />
    </parent>

    <groupId>de.tracetronic.jenkins.plugins</groupId>
    <artifactId>ecutest</artifactId>
    <version>2.16</version>
    <packaging>hpi</packaging>

    <name>TraceTronic ECU-TEST Plugin</name>
    <description>This plugin integrates Jenkins with ECU-TEST and generates reports on automated test execution.</description>
    <url>https://github.com/jenkinsci/ecutest-plugin</url>
    <inceptionYear>2015</inceptionYear>
    <organization>
        <name>TraceTronic GmbH</name>
        <url>https://www.tracetronic.de</url>
    </organization>
    <licenses>
        <license>
            <name>The BSD 3-Clause License</name>
            <url>http://opensource.org/licenses/BSD-3-Clause</url>
            <comments>All source code is under the BSD license.</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>cpoenisch</id>
            <name>Christian Pönisch</name>
            <email>christian.poenisch@tracetronic.de</email>
            <timezone>+1</timezone>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <url>https://github.com/jenkinsci/ecutest-plugin/graphs/contributors</url>
        </contributor>
    </contributors>

    <scm>
        <connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
        <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
        <tag>ecutest-2.16</tag>
    </scm>
    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/jenkinsci/ecutest-plugin/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Jenkins</system>
        <url>https://ci.jenkins.io/job/plugins/job/ecutest-plugin</url>
    </ciManagement>

    <properties>
        <!-- Jenkins base -->
        <jenkins.version>2.60.3</jenkins.version>
        <java.level>8</java.level>
        <hpi.compatibleSinceVersion>2.10.0</hpi.compatibleSinceVersion>

        <!-- Jenkins plugins -->
        <matrix-project.version>1.13</matrix-project.version>
        <icon-shim.version>2.0.3</icon-shim.version>
        <junit.version>1.27</junit.version>
        <structs.version>1.19</structs.version>
        <job-dsl.version>1.67</job-dsl.version>
        <credentials.version>2.1.19</credentials.version>
        <jquery-plugin.version>1.12.4-1</jquery-plugin.version>

        <!-- Static code analysis -->
        <maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
        <maven-pmd-plugin.version>3.13.0</maven-pmd-plugin.version>
        <pmd.version>6.24.0</pmd.version>
        <spotbugs.effort>Max</spotbugs.effort>
        <spotbugs.threshold>Low</spotbugs.threshold>

        <!-- Test scope -->
        <configuration-as-code.version>1.36</configuration-as-code.version>
        <equalsverifier.version>3.3</equalsverifier.version>
        <mockito-core.version>3.3.3</mockito-core.version>
        <concurrency>2</concurrency>
        <skipUTs>false</skipUTs>
        <skipITs>true</skipITs>

        <!-- JACOB -->
        <jacob.version>1.19</jacob.version>

        <!-- ANTLR -->
        <antlr4-maven-plugin.version>4.5.3</antlr4-maven-plugin.version>
        <antlr4-runtime.version>4.5.3</antlr4-runtime.version>

        <!-- SQLite -->
        <sqlite-jdbc.version>3.7.2</sqlite-jdbc.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>net.sf.jacob-project</groupId>
            <artifactId>jacob</artifactId>
            <version>${jacob.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sf.jacob-project</groupId>
            <artifactId>jacob</artifactId>
            <version>${jacob.version}</version>
            <type>dll</type>
            <classifier>x86</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.jacob-project</groupId>
            <artifactId>jacob</artifactId>
            <version>${jacob.version}</version>
            <type>dll</type>
            <classifier>x64</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>${antlr4-runtime.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>matrix-project</artifactId>
            <version>${matrix-project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.icon-shim</groupId>
            <artifactId>icon-shim</artifactId>
            <version>${icon-shim.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>structs</artifactId>
            <version>${structs.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>jquery</artifactId>
            <version>${jquery-plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>credentials</artifactId>
            <version>${credentials.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>job-dsl</artifactId>
            <version>${job-dsl.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jvnet.hudson</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.7-jenkins-1</version>
            <exclusions>
                <exclusion>
                    <groupId>xmlpull</groupId>
                    <artifactId>xmlpull</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xpp3</groupId>
                    <artifactId>xpp3_min</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>${sqlite-jdbc.version}</version>
        </dependency>
        <!-- Test scope -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito-core.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>nl.jqno.equalsverifier</groupId>
            <artifactId>equalsverifier</artifactId>
            <version>${equalsverifier.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- Pipeline test scope -->
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>script-security</artifactId>
            <version>1.41</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-job</artifactId>
            <version>2.12.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-cps</artifactId>
            <version>2.44</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-support</artifactId>
            <version>2.17</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-basic-steps</artifactId>
            <version>2.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-durable-task-step</artifactId>
            <version>2.18</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-api</artifactId>
            <version>2.25</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-step-api</artifactId>
            <version>2.14</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-step-api</artifactId>
            <version>2.14</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.jenkins</groupId>
            <artifactId>configuration-as-code</artifactId>
            <version>${configuration-as-code.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.jenkins.configuration-as-code</groupId>
            <artifactId>test-harness</artifactId>
            <version>${configuration-as-code.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>lib</id>
            <url>file://${project.basedir}/lib</url>
        </repository>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <exclude>InjectedTest.java</exclude>
                    </excludes>
                    <argLine>@{argLine}</argLine>
                    <skipTests>${skipUTs}</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*IT.java</include>
                        <include>InjectedTest.java</include>
                    </includes>
                    <argLine>@{argLine}</argLine>
                    <forkCount>${concurrency}</forkCount>
                    <reuseForks>true</reuseForks>
                    <skipITs>${skipITs}</skipITs>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doclint>none</doclint>
                    <sourceFileExcludes>
                        <exclude>**/Messages.java</exclude>
                        <exclude>**/RefFilter*.java</exclude>
                    </sourceFileExcludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <configLocation>${basedir}/.mvn/checkstyle-config.xml</configLocation>
                    <suppressionsLocation>${basedir}/.mvn/checkstyle-exclude.xml</suppressionsLocation>
                    <consoleOutput>true</consoleOutput>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <logViolationsToConsole>true</logViolationsToConsole>
                            <failOnViolation>true</failOnViolation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <configuration>
                    <excludeFilterFile>.mvn/spotbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven-pmd-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-core</artifactId>
                        <version>${pmd.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-java</artifactId>
                        <version>${pmd.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <analysisCache>true</analysisCache>
                    <minimumTokens>200</minimumTokens>
                    <targetJdk>1.${java.level}</targetJdk>
                    <linkXRef>false</linkXRef>
                    <excludeRoots>
                        <excludeRoot>target/generated-sources/antlr4</excludeRoot>
                        <excludeRoot>target/generated-sources/localizer</excludeRoot>
                    </excludeRoots>
                </configuration>
                <executions>
                    <execution>
                        <id>pmd</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>pmd-cpd</id>
                        <goals>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>${antlr4-maven-plugin.version}</version>
                <configuration>
                    <listener>false</listener>
                    <visitor>false</visitor>
                </configuration>
                <executions>
                    <execution>
                        <id>antlr</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <excludeTransitive>true</excludeTransitive>
                            <includeArtifactIds>jacob</includeArtifactIds>
                            <includeTypes>dll</includeTypes>
                            <outputDirectory>target/${project.artifactId}/WEB-INF/lib</outputDirectory>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>fast</id>
            <properties>
                <skipUTs>true</skipUTs>
                <checkstyle.skip>true</checkstyle.skip>
                <pmd.skip>true</pmd.skip>
                <spotbugs.skip>true</spotbugs.skip>
                <maven.javadoc.skip>true</maven.javadoc.skip>
            </properties>
        </profile>
    </profiles>
</project>
