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

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

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

	<parent>
		<groupId>io.gravitee</groupId>
		<artifactId>gravitee-parent</artifactId>
		<version>20.0</version>
	</parent>

	<groupId>io.gravitee.reporter</groupId>
	<artifactId>gravitee-reporter-file</artifactId>
	<version>2.5.2</version>
	<packaging>jar</packaging>

	<name>Gravitee.io APIM - Reporter - File</name>

	<properties>
		<gravitee-bom.version>2.5</gravitee-bom.version>
		<gravitee-gateway-api.version>1.31.0</gravitee-gateway-api.version>
		<gravitee-reporter-api.version>1.23.0</gravitee-reporter-api.version>
		<gravitee-common.version>1.24.0</gravitee-common.version>
		<gravitee-node.version>1.15.1</gravitee-node.version>

		<freemarker.version>2.3.31</freemarker.version>
		<jackson-dataformat-msgpack.version>0.8.22</jackson-dataformat-msgpack.version>
		<commons-validator.version>1.6</commons-validator.version>
        <!-- Property used by the publication job in CI-->
        <publish-folder-path>graviteeio-apim/plugins/reporters</publish-folder-path>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- Import bom to properly inherit all dependencies -->
			<dependency>
				<groupId>io.gravitee</groupId>
				<artifactId>gravitee-bom</artifactId>
				<version>${gravitee-bom.version}</version>
				<scope>import</scope>
				<type>pom</type>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>plugin.properties</include>
				</includes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<excludes>
					<exclude>plugin.properties</exclude>
				</excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<includes>
						<include>**/*IT.java</include>
						<include>**/*Test.java</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<appendAssemblyId>false</appendAssemblyId>
					<descriptors>
						<descriptor>src/main/assembly/plugin-assembly.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>make-policy-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.hubspot.maven.plugins</groupId>
				<artifactId>prettier-maven-plugin</artifactId>
				<version>0.12</version>
				<configuration>
					<nodeVersion>12.13.0</nodeVersion>
					<prettierJavaVersion>1.0.1</prettierJavaVersion>
				</configuration>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Gravitee internal dependencies -->
		<dependency>
			<groupId>io.gravitee.gateway</groupId>
			<artifactId>gravitee-gateway-api</artifactId>
			<version>${gravitee-gateway-api.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>io.gravitee.reporter</groupId>
			<artifactId>gravitee-reporter-api</artifactId>
			<version>${gravitee-reporter-api.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>io.gravitee.common</groupId>
			<artifactId>gravitee-common</artifactId>
			<version>${gravitee-common.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>io.gravitee.node</groupId>
			<artifactId>gravitee-node-api</artifactId>
			<version>${gravitee-node.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- Freemarker -->
		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>${freemarker.version}</version>
		</dependency>

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-core</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-circuit-breaker</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- MessagePack format support -->
		<dependency>
			<groupId>org.msgpack</groupId>
			<artifactId>jackson-dataformat-msgpack</artifactId>
			<version>${jackson-dataformat-msgpack.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-validator</groupId>
			<artifactId>commons-validator</artifactId>
			<version>${commons-validator.version}</version>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Spring dependencies -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>

		<!-- Unit Tests -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>
