<?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/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>ru.playa.keycloak</groupId>
    <artifactId>keycloak-kafka-provider</artifactId>
    <version>1.0.2</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>

    <name>Keycloak kafka providers for events</name>
    <description>Keycloak kafka providers for events</description>
    <url>https://gl.playa.ru/playa-public/keycloak-kafka-provider</url>

    <developers>
        <developer>
            <name>Anatoliy Pokhresniy</name>
            <email>a.pohresniy@playa.ru</email>
            <organization>Playa.Ru</organization>
            <organizationUrl>https://playa.ru</organizationUrl>
        </developer>
        <developer>
            <name>Aleksandr Buldaev</name>
            <email>a.buldaev@playa.ru</email>
            <organization>Playa.Ru</organization>
            <organizationUrl>https://playa.ru</organizationUrl>
        </developer>
        <developer>
            <name>Sergey Bezrukov</name>
            <email>s.bezrukov@playa.ru</email>
            <organization>Playa.Ru</organization>
            <organizationUrl>https://playa.ru</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <version.javadoc.plugin>2.10.1</version.javadoc.plugin>
        <version.deploy.plugin>2.8.2</version.deploy.plugin>
        <version.source.plugin>2.4</version.source.plugin>
        <version.release.plugin>2.5.3</version.release.plugin>
        <version.assembly.plugin>3.1.0</version.assembly.plugin>
        <version.pmd.plugin>3.9.0</version.pmd.plugin>
        <version.checkstyle.plugin>3.0.0</version.checkstyle.plugin>
        <version.surefire.plugin>2.22.0</version.surefire.plugin>

        <keycloak.version>13.0.0</keycloak.version>
    </properties>

    <scm>
        <url>scm:git:git@gl.playa.ru:playa-public/keycloak-kafka-provider.git</url>
        <developerConnection>scm:git:git@gl.playa.ru:playa-public/keycloak-kafka-provider.git</developerConnection>
        <tag>v1.0.2</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.keycloak</groupId>
            <artifactId>keycloak-server-spi</artifactId>
            <scope>provided</scope>
            <version>${keycloak.version}</version>
        </dependency>
        <dependency>
            <groupId>org.keycloak</groupId>
            <artifactId>keycloak-server-spi-private</artifactId>
            <scope>provided</scope>
            <version>${keycloak.version}</version>
        </dependency>
        <dependency>
            <groupId>org.keycloak</groupId>
            <artifactId>keycloak-services</artifactId>
            <scope>provided</scope>
            <version>${keycloak.version}</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${version.surefire.plugin}</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${version.checkstyle.plugin}</version>
                <configuration>
                    <consoleOutput>true</consoleOutput>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${version.pmd.plugin}</version>
                <configuration>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>1.8</targetJdk>
                    <rulesets>
                        <ruleset>pmd.xml</ruleset>
                    </rulesets>
                    <excludeRoots>
                        <excludeRoot>target/generated-sources</excludeRoot>
                    </excludeRoots>
                    <analysisCache>true</analysisCache>
                </configuration>
                <executions>
                    <execution>
                        <id>pmd-check</id>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>cpd-check</id>
                        <phase>test</phase>
                        <goals>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${version.deploy.plugin}</version>
            </plugin>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

            <!-- Maven Assembly Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <finalName>${project.artifactId}</finalName>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <appendAssemblyId>false</appendAssemblyId>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>9</source>
                    <target>9</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
