<?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>cz.integsoft.mule.ippm.db</groupId>
	<artifactId>integsoft-mule-database-properties-provider-module</artifactId>
	<version>2.0.0</version>
	<packaging>mule-extension</packaging>
	<name>integsoft-mule-database-properties-provider-module</name>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<javaRelease>11</javaRelease>
		<mule.version>4.6.23</mule.version>
		<app.runtime>4.6.23</app.runtime>
		<log4j2.version>2.23.0</log4j2.version>
	</properties>
	<parent>
		<groupId>org.mule.extensions</groupId>
		<artifactId>mule-modules-parent</artifactId>
		<version>1.6.23</version>
	</parent>

	<build>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-webdav-jackrabbit</artifactId>
				<version>3.4.1</version>
			</extension>
		</extensions>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
			<testResource>
				<directory>src/test/filters/${environment}/</directory>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.15.0</version>
				<configuration>
					<release>${javaRelease}</release>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.6.0</version>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>8.29</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<configuration>
							<encoding>UTF-8</encoding>
							<consoleOutput>true</consoleOutput>
							<linkXRef>false</linkXRef>
						</configuration>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<violationSeverity>warning</violationSeverity>
					<failOnViolation>false</failOnViolation>
					<failsOnError>true</failsOnError>
					<configLocation>https://checkstyle.integsoft.cz/java-checkstyle-config.xml</configLocation>
				</configuration>
			</plugin>
			<!-- The configuration of maven-jar-plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.5.0</version>
				<!-- The configuration of the plugin -->
				<configuration>
					<!-- Configuration of the archiver -->
					<archive>
						<!-- Manifest specific configuration -->
						<manifestEntries>
							<Implementation-Build>${git.commit.id.abbrev} ${git.build.time}</Implementation-Build>
							<Version>${project.version}</Version>
							<Vendor>${project.organization.name}</Vendor>
							<Environment>${environment}</Environment>
							<Company>${company}</Company>
							<Automatic-Module-Name>cz.integsoft.mule.ippm.db</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<!-- Plugin for adding date, time and revision to manifest file -->
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>4.0.5</version>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
						<phase>initialize</phase>
					</execution>
				</executions>
				<configuration>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/revision</generateGitPropertiesFilename>
					<includeOnlyProperties>
						<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
						<includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
					</includeOnlyProperties>
					<commitIdGenerationMode>full</commitIdGenerationMode>
					<offline>true</offline>
					<format>properties</format>
					<injectAllReactorProjects>true</injectAllReactorProjects>
				</configuration>
			</plugin>
			<!-- Javadoc plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.12.0</version>
				<configuration>
					<detectJavaApiLink>false</detectJavaApiLink>
					<show>public</show>
					<destDir>docs</destDir>
					<!-- For Java 8 add this param to generate javadoc -->
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
				<executions>
					<execution>
						<id>make-javadoc</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>javadoc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.5.5</version>
			</plugin>
		</plugins>
	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-bom</artifactId>
				<version>${log4j2.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<!-- for JDK17 -->
		<dependency>
			<groupId>org.mule.sdk</groupId>
			<artifactId>mule-sdk-api</artifactId>
			<version>0.11.10</version>
		</dependency>
		<dependency>
			<groupId>org.mule.runtime</groupId>
			<artifactId>mule-module-spring-config</artifactId>
			<version>${mule.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.44</version>
			<scope>test</scope>
		</dependency>
		<!-- Logging in tests -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.lmax</groupId>
			<artifactId>disruptor</artifactId>
			<version>3.4.4</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<id>local-dist</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<environment>local</environment>
			</properties>
		</profile>
		<profile>
			<id>ci</id>
			<properties>
				<environment>ci</environment>
			</properties>
		</profile>
	</profiles>
	<repositories>
		<repository>
			<id>anypoint-exchange-v3</id>
			<name>Anypoint Exchange V3</name>
			<url>https://maven.eu1.anypoint.mulesoft.com/api/v3/maven</url>
			<layout>default</layout>
		</repository>
	</repositories>
	<scm>
		<connection>scm:git:git@git.integsoft.cz:internal/mule-modules/integsoft-properties-providers.git</connection>
		<developerConnection>scm:git:git@git.integsoft.cz:internal/mule-modules/integsoft-properties-providers.git</developerConnection>
	</scm>
	<distributionManagement>
		<repository>
			<id>integsoft-archiva-deployment</id>
			<name>Internal Releases</name>
			<url>http://archiva.integsoft.zacpalova/repository/internal/</url>
		</repository>
		<snapshotRepository>
			<id>integsoft-archiva-deployment</id>
			<name>Internal Snapshots</name>
			<url>http://archiva.integsoft.zacpalova/repository/snapshots/</url>
		</snapshotRepository>
	</distributionManagement>

</project>
