<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (c) 2015-2017 TraceTronic GmbH
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:

      1. Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.

      2. Redistributions in binary form must reproduce the above copyright notice, this
         list of conditions and the following disclaimer in the documentation and/or
         other materials provided with the distribution.

      3. Neither the name of TraceTronic GmbH nor the names of its
         contributors may be used to endorse or promote products derived from
         this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<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.18</version>
        <relativePath />
    </parent>

    <groupId>de.tracetronic.jenkins.plugins</groupId>
    <artifactId>ecutest</artifactId>
    <version>2.4</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://wiki.jenkins.io/display/JENKINS/TraceTronic+ECU-TEST+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>

    <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.4</tag>
    </scm>

    <properties>
        <!-- Jenkins base -->
        <jenkins.version>2.60.3</jenkins.version>
        <java.level>8</java.level>

        <!-- Jenkins plugins -->
        <matrix-project.version>1.13</matrix-project.version>
        <icon-shim.version>2.0.3</icon-shim.version>
        <junit.version>1.24</junit.version>
        <structs.version>1.14</structs.version>
        <job-dsl.version>1.67</job-dsl.version>
        <credentials.version>2.1.17</credentials.version>
        <jquery-plugin.version>1.12.4-0</jquery-plugin.version>

        <!-- Static code analysis -->
        <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
        <maven-pmd-plugin.version>3.10.0</maven-pmd-plugin.version>

        <!-- Test scope -->
        <equalsverifier.version>2.4.8</equalsverifier.version>
        <mockito-core.version>2.19.1</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.7.1</antlr4-maven-plugin.version>
        <antlr4-runtime.version>4.7.1</antlr4-runtime.version>

        <!-- SQLite -->
        <sqlite-jdbc.version>3.7.2</sqlite-jdbc.version>
    </properties>

    <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>

    <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>
        <!-- Test scope -->
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>${sqlite-jdbc.version}</version>
        </dependency>
        <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>
            <scope>test</scope>
        </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>
            <scope>test</scope>
        </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>
            <scope>test</scope>
        </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>
    </dependencies>

    <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>
                    <reuseForks>true</reuseForks>
                    <forkCount>${concurrency}</forkCount>
                    <skipITs>${skipITs}</skipITs>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <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}/config/checkstyle-config.xml</configLocation>
                    <suppressionsLocation>${basedir}/config/checkstyle-exclude.xml</suppressionsLocation>
                    <propertyExpansion>config_loc=config</propertyExpansion>
                    <consoleOutput>true</consoleOutput>
                    <failOnViolation>false</failOnViolation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <excludeFilterFile>${basedir}/config/findbugs-exclude.xml</excludeFilterFile>
                    <effort>Max</effort>
                    <threshold>Medium</threshold>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven-pmd-plugin.version}</version>
                <configuration>
                    <rulesets>
                        <ruleset>${basedir}/config/pmd-config.xml</ruleset>
                    </rulesets>
                    <excludeRoots>
                        <excludeRoot>target/generated-sources/localizer</excludeRoot>
                        <excludeRoot>target/generated-sources/antlr4</excludeRoot>
                    </excludeRoots>
                    <minimumTokens>120</minimumTokens>
                    <targetJdk>${java-target.version}</targetJdk>
                    <failOnViolation>false</failOnViolation>
                    <analysisCache>true</analysisCache>
                </configuration>
            </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>

    <!-- This profile is used to store Eclipse m2e settings only.
         It has no influence on the Maven build itself. -->
    <profiles>
        <profile>
            <id>only-eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.m2e</groupId>
                        <artifactId>lifecycle-mapping</artifactId>
                        <configuration>
                            <lifecycleMappingMetadata>
                                <pluginExecutions>
                                    <pluginExecution>
                                        <pluginExecutionFilter>
                                            <groupId>org.jenkins-ci.tools</groupId>
                                            <artifactId>maven-dependency-plugin</artifactId>
                                            <versionRange>[2.3,)</versionRange>
                                            <goals>
                                                <goal>copy-dependencies</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <ignore />
                                        </action>
                                    </pluginExecution>
                                </pluginExecutions>
                            </lifecycleMappingMetadata>
                        </configuration>
                    </plugin>
                </plugins>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-javadoc-plugin</artifactId>
                                                <versionRange>[1.0.0,)</versionRange>
                                                <goals>
                                                    <goal>javadoc</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
