<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.17</version>
    </parent>

    <artifactId>crowd2</artifactId>
    <version>2.0.0-beta2</version>

    <packaging>hpi</packaging>

    <name>Crowd 2 Integration</name>
    <description>SecurityRealm that enables the use of Atlassian's Crowd identity management server.</description>

    <url>http://wiki.jenkins-ci.org/display/JENKINS/Crowd+2+Plugin</url>
    <issueManagement>
        <system>JIRA</system>
        <url>https://issues.jenkins-ci.org/</url>
    </issueManagement>

    <developers>
        <developer>
            <id>theit</id>
            <name>Thorsten Heit</name>
            <email>theit@gmx.de</email>
        </developer>
        <developer>
            <id>integer</id>
            <name>Kanstantsin Shautsou</name>
        </developer>
        <developer>
            <id>pingunaut</id>
            <name>Martin Spielmann</name>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Johno Crawford</name>
            <email>johno@hellface.com</email>
            <url>http://www.hellface.com</url>
        </contributor>
    </contributors>

    <properties>
        <jenkins.version>2.121.1</jenkins.version>
        <crowd-integration-client-rest.version>2.8.8</crowd-integration-client-rest.version>
        <apache-httpcomponents-client-4-api-plugin.version>4.5.5-3.0</apache-httpcomponents-client-4-api-plugin.version>
        <!-- JUnit dependency versions -->
        <junit.version>4.12</junit.version>
        <junit-vintage-engine>5.2.0</junit-vintage-engine>
        <junit-jupiter.version>5.2.0</junit-jupiter.version>
        <junit-platform.version>1.2.0</junit-platform.version>
        <mockito.version>2.19.0</mockito.version>
        <jacoco-maven-plugin.version>0.8.1</jacoco-maven-plugin.version>
        <maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
        <jenkins-mailer-plugin.version>1.21</jenkins-mailer-plugin.version>
        <commons-codec.version>1.11</commons-codec.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <java.level>8</java.level>
        <findbugs.failOnError>false</findbugs.failOnError>
    </properties>


    <scm>
        <connection>scm:git:git://github.com/jenkinsci/crowd2-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/jenkinsci/crowd2-plugin.git</developerConnection>
        <url>https://github.com/jenkinsci/crowd2-plugin</url>
        <tag>crowd2-2.0.0-beta2</tag>
    </scm>


    <repositories>
        <repository>
            <id>atlassian</id>
            <url>https://m2proxy.atlassian.com/repository/public/</url>
        </repository>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>target/jacoco.exec</dataFile>
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <propertyName>surefireArgLine</propertyName>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <argLine>${surefireArgLine}</argLine>
                </configuration>
                <dependencies>
                    <!-- to let surefire to run JUnit 4 but also JUnit 5 
                        tests -->
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>${junit-platform.version}</version>
                    </dependency>
                    <!-- JUnit vintage engine to run JUnit 3 or JUnit 4 tests -->
                    <dependency>
                        <groupId>org.junit.vintage</groupId>
                        <artifactId>junit-vintage-engine</artifactId>
                        <version>${junit-vintage-engine}</version>
                    </dependency>
                    <!-- JUnit 5 engine to run JUnit 5 tests -->
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>${junit-jupiter.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>display-info</id>
                        <configuration>
                            <rules>
                                <requireUpperBoundDeps>
                                    <excludes combine.children="append">
                                        <exclude>org.apache.commons:commons-lang3</exclude>
                                    </excludes>
                                </requireUpperBoundDeps>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-integration-client-rest</artifactId>
            <version>${crowd-integration-client-rest.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient-cache</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>apache-httpcomponents-client-4-api</artifactId>
            <version>${apache-httpcomponents-client-4-api-plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>mailer</artifactId>
            <version>${jenkins-mailer-plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
