<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>name.nkonev.r2dbc-migrate</groupId>
	<artifactId>r2dbc-migrate-parent</artifactId>
	<version>1.8.2</version>
	<name>r2dbc-migrate parent project</name>
	<description>R2DBC migration tool and library</description>
	<packaging>pom</packaging>
	<url>https://github.com/nkonev/r2dbc-migrate</url>

	<scm>
		<connection>scm:git:git://github.com/nkonev/r2dbc-migrate.git</connection>
		<developerConnection>scm:git:git@github.com:nkonev/r2dbc-migrate.git</developerConnection>
		<url>https://github.com/nkonev/r2dbc-migrate</url>
		<tag>1.8.2</tag>
	</scm>

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

	<developers>
		<developer>
			<id>nkonev</id>
			<name>Nikita Konev</name>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<java.version>8</java.version>
		<spring.boot.version>2.6.0</spring.boot.version>
		<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
		<testcontainers.version>1.16.2</testcontainers.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.encoding>${project.build.sourceEncoding}</maven.compiler.encoding>
		<maven.resources.encoding>${project.build.sourceEncoding}</maven.resources.encoding>
		<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
		<reflections.version>0.9.12</reflections.version>
		<mariadb.driver.version>1.0.3</mariadb.driver.version>
		<commons.io.version>2.11.0</commons.io.version>
	</properties>

	<modules>
		<module>r2dbc-migrate-core</module>
		<module>r2dbc-migrate-resource-reader-api</module>
		<module>r2dbc-migrate-resource-reader-reflections</module>
		<module>r2dbc-migrate-resource-reader-spring</module>
		<module>r2dbc-migrate-spring-boot-starter</module>
		<module>r2dbc-migrate-standalone</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<repositories>
		<repository>
			<id>central</id>
			<url>https://repo.maven.apache.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>central</id>
			<url>https://repo.maven.apache.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

	<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-compiler-plugin</artifactId>
				<version>${maven.compiler.plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven.surefire.plugin.version}</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.1</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>3.2.0</version>
				<configuration>
					<source>${java.version}</source>
					<encoding>UTF-8</encoding>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>true</pushChanges>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<arguments>-DskipTests</arguments>
					<tagNameFormat>@{project.version}</tagNameFormat>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- GPG Signature on release -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<executable>gpg2</executable>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
									<passphrase>${gpg.passphrase}</passphrase>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
