<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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.apache</groupId>
		<artifactId>apache</artifactId>
		<version>18</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>

    <packaging>nar</packaging>

	<groupId>co.macrometa.c8streams.handlers</groupId>
	<artifactId>kop</artifactId>
	<version>2.8.1.3</version>
	<name>Macrometa :: Pulsar Protocol Handler :: Kafka</name>
	<description>Kafka on Pulsar implemented using Pulsar Protocol Handler</description>

	<properties>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.compiler.source>1.8</maven.compiler.source>
		<javac.target>1.8</javac.target>
		<redirectTestOutputToFile>true</redirectTestOutputToFile>
		<commons-lang3.version>3.11</commons-lang3.version>
		<jackson.version>2.12.1</jackson.version>
		<guava.version>24.1.1-jre</guava.version>
		<grpc.version>1.18.0</grpc.version>
		<kafka.version>2.0.0</kafka.version>
		<log4j2.version>2.13.3</log4j2.version>
		<lombok.version>1.18.4</lombok.version>
		<mockito.version>2.22.0</mockito.version>
		<pulsar.group.id>io.streamnative</pulsar.group.id>
		<pulsar.version>2.8.0.15</pulsar.version>
		<slf4j.version>1.7.25</slf4j.version>
		<spotbugs-annotations.version>3.1.8</spotbugs-annotations.version>
		<testcontainers.version>1.15.1</testcontainers.version>
		<testng.version>6.14.3</testng.version>
		<!-- plugin dependencies -->
		<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
		<puppycrawl.checkstyle.version>8.37</puppycrawl.checkstyle.version>
		<spotbugs-maven-plugin.version>4.2.2</spotbugs-maven-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
	</properties>

  <!-- include the dependencies -->
  <dependencies>
    <!-- runtime dependencies -->
	  <dependency>
		  <groupId>com.github.spotbugs</groupId>
		  <artifactId>spotbugs-annotations</artifactId>
		  <version>${spotbugs-annotations.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>pulsar-broker</artifactId>
		  <version>${pulsar.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>pulsar-broker-common</artifactId>
		  <version>${pulsar.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>pulsar-client-original</artifactId>
		  <version>${pulsar.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>pulsar-client-admin-original</artifactId>
		  <version>${pulsar.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>testmocks</artifactId>
		  <version>${pulsar.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>org.apache.kafka</groupId>
		  <artifactId>kafka-clients</artifactId>
		  <version>${kafka.version}</version>
	  </dependency>

	  <dependency>
		  <groupId>org.slf4j</groupId>
		  <artifactId>slf4j-api</artifactId>
		  <version>${slf4j.version}</version>
	  </dependency>

	  <dependency>
		  <groupId>org.projectlombok</groupId>
		  <artifactId>lombok</artifactId>
		  <version>${lombok.version}</version>
		  <scope>provided</scope>
	  </dependency>

	  <dependency>
		  <groupId>org.apache.logging.log4j</groupId>
		  <artifactId>log4j-core</artifactId>
		  <version>${log4j2.version}</version>
	  </dependency>

	  <dependency>
		  <groupId>com.fasterxml.jackson.core</groupId>
		  <artifactId>jackson-databind</artifactId>
		  <version>${jackson.version}</version>
	  </dependency>

	  <dependency>
		  <groupId>com.fasterxml.jackson.dataformat</groupId>
		  <artifactId>jackson-dataformat-yaml</artifactId>
		  <version>${jackson.version}</version>
	  </dependency>

	  <dependency>
		  <groupId>org.apache.commons</groupId>
		  <artifactId>commons-lang3</artifactId>
		  <version>${commons-lang3.version}</version>
	  </dependency>

	  <dependency>
		  <groupId>org.apache.logging.log4j</groupId>
		  <artifactId>log4j-slf4j-impl</artifactId>
		  <version>${log4j2.version}</version>
		  <scope>test</scope>
	  </dependency>

	  <dependency>
		  <groupId>org.testng</groupId>
		  <artifactId>testng</artifactId>
		  <version>${testng.version}</version>
		  <scope>test</scope>
	  </dependency>

	  <dependency>
		  <groupId>org.mockito</groupId>
		  <artifactId>mockito-core</artifactId>
		  <version>${mockito.version}</version>
		  <scope>test</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>pulsar-broker</artifactId>
		  <version>${pulsar.version}</version>
		  <type>test-jar</type>
		  <scope>test</scope>
	  </dependency>

	  <dependency>
		  <groupId>${pulsar.group.id}</groupId>
		  <artifactId>managed-ledger</artifactId>
		  <version>${pulsar.version}</version>
		  <type>test-jar</type>
		  <scope>test</scope>
	  </dependency>
  </dependencies>

	<developers>
		<developer>
			<name>Macrometa</name>
			<url>https://github.com/macrometacorp</url>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/Macrometacorp/c8streams-kop.git</url>
		<connection>scm:git:git@github.com:Macrometacorp/c8streams-kop.git</connection>
		<developerConnection>scm:git:git@github.com:Macrometacorp/c8streams-kop.git</developerConnection>
		<tag>kop-2.8.1.3</tag>
	</scm>

	<organization>
		<name>Macrometa</name>
		<url>https://www.macrometa.co</url>
	</organization>
	
	<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>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${maven-checkstyle-plugin.version}</version>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>${puppycrawl.checkstyle.version}</version>
					</dependency>
				</dependencies>
				<configuration>
					<configLocation>../resources/checkstyle.xml</configLocation>
					<suppressionsLocation>../resources/suppressions.xml</suppressionsLocation>
					<encoding>UTF-8</encoding>
					<consoleOutput>true</consoleOutput>
					<failOnViolation>true</failOnViolation>
					<includeResources>false</includeResources>
					<includeTestSourceDirectory>true</includeTestSourceDirectory>
				</configuration>
				<executions>
					<execution>
						<id>checkstyle</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>${spotbugs-maven-plugin.version}</version>
				<configuration>
					<excludeFilterFile>../resources/findbugsExclude.xml</excludeFilterFile>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.nifi</groupId>
				<artifactId>nifi-nar-maven-plugin</artifactId>
				<version>1.2.0</version>
				<extensions>true</extensions>
				<configuration>
					<finalName>${project.artifactId}-${project.version}</finalName>
				</configuration>
				<executions>
					<execution>
						<id>default-nar</id>
						<phase>package</phase>
						<goals>
							<goal>nar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>distro-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<attach>false</attach>
							<finalName>kop-${project.version}</finalName>
							<descriptors>
								<descriptor>src/assemble/bin.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.4.2</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.8.1</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.6</version>
				<configuration>
					<skip>false</skip>
				</configuration>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
		</plugins>
	</build>

</project>
