<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.github.ideahut</groupId>
	<artifactId>qms-shared</artifactId>
	<version>1.0.0</version>
	
	<name>qms-shared</name>
	<description>Shared library for microservice (Quarkus)</description>
	<url>https://github.com/ideahut/qms-shared</url>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	
	<scm>
		<developerConnection>scm:git:ssh://github.com/ideahut/qms-shared.git</developerConnection>
		<connection>${project.scm.developerConnection}</connection>
		<url>${project.url}</url>
	</scm>
	
	<developers>
		<developer>
			<id>thomson.napitupulu</id>
			<name>Thomson Napitupulu</name>
			<email>thomson.na7pulu@gmail.com</email>
			<organization>Ideahut</organization>
			<organizationUrl>https://github.com/ideahut</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<skipTests>true</skipTests>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<surefire-plugin.version>2.22.1</surefire-plugin.version>
		<quarkus.version>1.1.1.Final</quarkus.version>
		<lombok.version>1.16.16</lombok.version>
		<spring-data.version>2.2.3.RELEASE</spring-data.version>
		<jedis.version>3.2.0</jedis.version>	
	</properties>
	
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.quarkus</groupId>
				<artifactId>quarkus-bom</artifactId>
				<version>${quarkus.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<dependencies>
	
		<!-- QMS -->
		<dependency>
			<groupId>com.github.ideahut</groupId>
			<artifactId>qms-client</artifactId>
			<version>${project.version}</version>
		</dependency>
	
	
		<!-- LOMBOK -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
		</dependency>
		
		
		<!-- HTTP SERVLET -->
		<dependency>
			<groupId>io.quarkus.http</groupId>
			<artifactId>quarkus-http-servlet</artifactId>
		</dependency>
		
		
		<!-- PANACHE -->
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-hibernate-orm-panache</artifactId>
		</dependency>
		
		
		<!-- JACKSON -->
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jackson2-provider</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.dataformat</groupId>
			<artifactId>jackson-dataformat-xml</artifactId>
		</dependency>
		
		
		<!-- JSONB -->
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-resteasy-jsonb</artifactId>
		</dependency>
		
		
		<!-- REDIS -->
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			<version>${jedis.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-redis</artifactId>
			<version>${spring-data.version}</version>
		</dependency>
		
		
		<!-- KAFKA -->
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-kafka-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.kafka</groupId>
			<artifactId>kafka-clients</artifactId>
		</dependency>
		
	</dependencies>
	
	<build>
		<plugins>
			<plugin>
				<groupId>io.quarkus</groupId>
				<artifactId>quarkus-bootstrap-maven-plugin</artifactId>
				<version>${quarkus.version}</version>
			</plugin>
			<plugin>
				<groupId>io.quarkus</groupId>
				<artifactId>quarkus-maven-plugin</artifactId>
				<version>${quarkus.version}</version>
				<configuration>
					<uberJar>true</uberJar>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>build</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${surefire-plugin.version}</version>
				<configuration>
					<systemProperties>
						<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
					</systemProperties>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>native</id>
			<activation>
				<property>
					<name>native</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>io.quarkus</groupId>
						<artifactId>quarkus-maven-plugin</artifactId>
						<version>${quarkus.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>native-image</goal>
								</goals>
								<configuration>
									<enableHttpUrlHandler>true</enableHttpUrlHandler>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>${surefire-plugin.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
								<configuration>
									<systemProperties>
										<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
									</systemProperties>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	

</project>