<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>3.40</version>
    </parent>

    <groupId>pl.damianszczepanik</groupId>
    <artifactId>build-history-manager</artifactId>
    <version>0.1.0-beta</version>
    <packaging>hpi</packaging>
    <name>Build History Manager</name>
    <description>
        Jenkins plugin that allows to define which builds should be removed from the history and which preserved
    </description>
    <url>https://github.com/damianszczepanik/build-history-manager-plugin</url>

    <properties>
        <java.level>8</java.level>

        <jacoco.version>0.7.9</jacoco.version>
        <powermock.version>1.6.6</powermock.version>
    </properties>

    <scm>
        <connection>scm:git:git@github.com:jenkinsci/build-history-manager-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:jenkinsci/build-history-manager-plugin.git</developerConnection>
        <url>https://github.com/jenkinsci/build-history-manager-plugin</url>
      <tag>build-history-manager-0.1.0-beta</tag>
  </scm>
    <ciManagement>
        <system>travis</system>
        <url>https://travis-ci.org/damianszczepanik/build-history-manager-plugin</url>
    </ciManagement>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://github.com/damianszczepanik/build-history-manager-plugin/blob/master/LICENSE</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>damianszczepanik</id>
            <name>Damian Szczepanik</name>
            <email>damianszczepanik@github</email>
        </developer>
    </developers>

    <repositories>
        <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.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <check />
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.21.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <systemPropertyVariables>
                        <jacoco-agent.destfile>${project.build.directory}/jacoco/jacoco.exec</jacoco-agent.destfile>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jenkins-ci.tools</groupId>
                <artifactId>maven-hpi-plugin</artifactId>
                <version>3.5</version>
                <configuration>
                    <!-- Jenkins test InjectedTest renamed to InjectedIT so it is executed only during integration tests -->
                    <injectedTestName>InjectionIT</injectedTestName>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>token-macro</artifactId>
            <version>2.8</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
            <!-- powermock wants objenesis 2.4 and mockito wants objenesis 2.1 -->
            <!-- exclude from mockito so that powermock version is used -->
            <exclusions>
                <exclusion>
                    <groupId>org.objenesis</groupId>
                    <artifactId>objenesis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>${powermock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <version>${powermock.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
