<?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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.strimzi</groupId>
    <artifactId>kafka-env-var-config-provider</artifactId>
    <version>1.1.0</version>

    <licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

    <name>Kafka EnvVar Config Provider</name>
    <description>Apache Kafka configuration provider for reading data from environment variables</description>
    <url>https://github.com/strimzi/kafka-env-var-config-provider</url>

    <scm>
        <connection>scm:git:git:/github.com/strimzi/kafka-env-var-config-provider.git</connection>
        <developerConnection>scm:git:ssh://github.com/strimzi/kafka-env-var-config-provider.git</developerConnection>
        <url>https://github.com/strimzi/kafka-env-var-config-provider</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/strimzi/kafka-env-var-config-provider/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <name>Tom Bentley</name>
            <email>tbentley@redhat.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>https://www.redhat.com</organizationUrl>
        </developer>
        <developer>
            <name>Paolo Patierno</name>
            <email>ppatierno@live.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>https://www.redhat.com</organizationUrl>
        </developer>
        <developer>
            <name>Jakub Scholz</name>
            <email>github@scholzj.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>https://www.redhat.com</organizationUrl>
        </developer>
        <developer>
            <name>Sam Hawker</name>
            <email>sam.b.hawker@gmail.com</email>
            <organization>IBM</organization>
            <organizationUrl>https://www.ibm.com</organizationUrl>
        </developer>
        <developer>
            <name>Jakub Stejskal</name>
            <email>xstejs24@gmail.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>https://www.redhat.com</organizationUrl>
        </developer>
        <developer>
            <name>Stanislav Knot</name>
            <email>sknot@redhat.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>https://www.redhat.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <maven.checkstyle.version>3.2.0</maven.checkstyle.version>
        <maven.spotbugs.version>4.7.3.0</maven.spotbugs.version>
        <spotbugs.version>4.7.3</spotbugs.version>
        <maven.surefire.version>3.0.0-M7</maven.surefire.version>
        <maven.failsafe.version>3.0.0-M7</maven.failsafe.version>
        <maven.javadoc.version>3.4.1</maven.javadoc.version>
        <maven.source.version>3.2.1</maven.source.version>
        <maven.jar.version>3.3.0</maven.jar.version>
        <maven.assembly.version>3.4.2</maven.assembly.version>
        <maven.gpg.version>3.0.1</maven.gpg.version>
        <sonatype.nexus.staging>1.6.7</sonatype.nexus.staging>

        <kafka.version>3.3.1</kafka.version>
        <slf4j.version>1.7.36</slf4j.version>

        <junit5.version>5.7.2</junit5.version>
        <hamcrest.version>2.2</hamcrest.version>
	</properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${kafka.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit5.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.version}</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>.checkstyle/checkstyle.xml</configLocation>
                            <headerLocation>.checkstyle/java.header</headerLocation>
                            <suppressionsLocation>.checkstyle/suppressions.xml</suppressionsLocation>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.failsafe.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${maven.spotbugs.version}</version>
                <dependencies>
                    <!-- overwrite dependency on spotbugs if you want to specify the version of˓→spotbugs -->
                    <dependency>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs</artifactId>
                        <version>${spotbugs.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <effort>Max</effort>
                    <!-- Reports all bugs (other values are medium and max) -->
                    <threshold>Low</threshold>
                    <!-- Produces XML report -->
                    <xmlOutput>true</xmlOutput>
                    <!-- Configures the directory in which the XML report is created -->
                    <spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
                    <!-- Configures the file for excluding warnings -->
                    <excludeFilterFile>${project.basedir}/.spotbugs/spotbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <show>public</show>
                            <failOnError>true</failOnError>
                            <failOnWarnings>true</failOnWarnings>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven.assembly.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <tarLongFileMode>posix</tarLongFileMode>
                            <descriptors>
                                <descriptor>src/main/assembly/dist.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--batch</arg>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${sonatype.nexus.staging}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
