<?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>com.github.kagkarlsson</groupId>
	<artifactId>db-scheduler-parent</artifactId>
	<version>13.0.0</version>
    <packaging>pom</packaging>

	<name>db-scheduler: Parent</name>
	<description>Simple persistent scheduler for scheduled tasks, recurring or ad-hoc.</description>
	<url>https://github.com/kagkarlsson/db-scheduler</url>
	<inceptionYear>2015</inceptionYear>
	<developers>
		<developer>
			<name>Gustav Karlsson</name>
			<email>kagkarlsson@gmail.com</email>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<jdk.version>1.8</jdk.version>
		<maven.compiler.source>${jdk.version}</maven.compiler.source>
		<maven.compiler.target>${jdk.version}</maven.compiler.target>
		<compilerArgument />
		<license.dir>${project.basedir}/.license</license.dir>

		<!-- Build-time flags -->
		<skipChecks>false</skipChecks>
		<failOnMissingHeader>true</failOnMissingHeader>
		<dependency-plugin.failOnWarning>true</dependency-plugin.failOnWarning>

		<!-- Dependency versions -->
		<slf4j.version>1.7.36</slf4j.version>
		<logback.version>1.2.12</logback.version>
		<spring-boot.version>2.7.11</spring-boot.version>
<!--		<spring-boot.version>3.0.6</spring-boot.version>-->
		<micrometer.version>1.11.1</micrometer.version>
		<gson.version>2.10.1</gson.version>
		<jackson.version>2.15.2</jackson.version>
		<postgresql.version>42.6.0</postgresql.version>
		<guava.version>32.0.1-jre</guava.version>
	</properties>

	<modules>
		<module>db-scheduler</module>
		<module>db-scheduler-boot-starter</module>
        <module>examples</module>
    </modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>5.9.0</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-bom</artifactId>
				<version>4.11.0</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.testcontainers</groupId>
				<artifactId>testcontainers-bom</artifactId>
				<version>1.17.3</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- Override to make testcontainers work on M1 -->
			<dependency>
				<groupId>net.java.dev.jna</groupId>
				<artifactId>jna</artifactId>
				<version>5.11.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.12.0</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<compilerArgument>${compilerArgument}</compilerArgument>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.5.0</version>
					<executions>
						<execution>
							<goals>
								<goal>analyze-only</goal>
							</goals>
							<configuration>
								<failOnWarning>${dependency-plugin.failOnWarning}</failOnWarning>
								<ignoreNonCompile>true</ignoreNonCompile>
								<ignoredDependencies>
									<ignoredDependency>org.springframework.boot:spring-boot-autoconfigure-processor</ignoredDependency>
									<ignoredDependency>org.springframework.boot:spring-boot-configuration-processor</ignoredDependency>
								</ignoredDependencies>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>4.2</version>
					<configuration>
						<licenseSets>
							<licenseSet>
								<header>${license.dir}/license-header.txt</header>
								<includes>
									<include>**/*.java</include>
								</includes>
								<excludes>
									<exclude>.github/**</exclude>
									<exclude>**/src/test/**</exclude>
									<exclude>**/RuntimeTypeAdapterFactory.java</exclude>
								</excludes>
							</licenseSet>
						</licenseSets>
						<failIfMissing>${failOnMissingHeader}</failIfMissing>
					</configuration>
					<executions>
						<execution>
							<id>check-license-header</id>
							<goals>
								<goal>check</goal>
							</goals>
							<phase>test</phase>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.4.1</version>
					<configuration>
						<createSourcesJar>true</createSourcesJar>
						<shadeSourcesContent>true</shadeSourcesContent>
						<artifactSet>
							<includes>
								<include>com.cronutils:*</include>
								<include>com.github.kagkarlsson:micro-jdbc:*</include>
							</includes>
						</artifactSet>
						<filters>
							<filter>
								<artifact>com.cronutils:*</artifact>
								<excludes>
									<exclude>CronUtilsI18N*.properties</exclude>
									<exclude>checkstyle.xml</exclude>
									<exclude>META-INF/**</exclude>
								</excludes>
							</filter>
						</filters>
						<relocations>
							<relocation>
								<pattern>com.github.kagkarlsson.jdbc</pattern>
								<shadedPattern>com.github.kagkarlsson.shaded.jdbc</shadedPattern>
							</relocation>
							<relocation>
								<pattern>com.cronutils</pattern>
								<shadedPattern>com.github.kagkarlsson.shaded.cronutils</shadedPattern>
							</relocation>
						</relocations>
					</configuration>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>shade</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- Release plugins -->
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.5.0</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<doclint>none</doclint>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
							<configuration>
								<includePom>true</includePom>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
					<configuration>
						<keyname>github.com/kagkarlsson</keyname>
						<passphraseServerId>github.com/kagkarlsson</passphraseServerId>
						<gpgArguments>
							<arg>--pinentry-mode</arg>
							<arg>loopback</arg>
						</gpgArguments>
					</configuration>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.diffplug.spotless</groupId>
				<artifactId>spotless-maven-plugin</artifactId>
				<version>2.36.0</version>
				<configuration>
					<java>
						<includes>
							<include>src/main/java/**/*.java</include> <!-- Check application code -->
							<include>src/test/java/**/*.java</include> <!-- Check application tests code -->
						</includes>
						<googleJavaFormat>
							<version>1.16.0</version>
							<style>GOOGLE</style>
						</googleJavaFormat>
						<importOrder />
						<removeUnusedImports />
						<toggleOffOn/>
						<trimTrailingWhitespace/>
						<endWithNewline/>
					</java>
				</configuration>
			</plugin>
		</plugins>

	</build>

	<profiles>
		<profile>
			<id>skipChecks</id>
			<activation>
				<property>
					<name>skipChecks</name>
					<value>true</value>
				</property>
			</activation>
			<properties>
				<skipChecks>true</skipChecks>
				<failOnMissingHeader>false</failOnMissingHeader>
				<dependency-plugin.failOnWarning>false</dependency-plugin.failOnWarning>
			</properties>
		</profile>
		<profile>
			<id>sources</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>publication</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>springBootDevelopment</id>
			<pluginRepositories>
				<pluginRepository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/milestone</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/snapshot</url>
					<releases>
						<enabled>false</enabled>
					</releases>
				</pluginRepository>
			</pluginRepositories>
			<repositories>
				<repository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/milestone</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/snapshot</url>
					<releases>
						<enabled>false</enabled>
					</releases>
				</repository>
			</repositories>
		</profile>
	</profiles>

	<scm>
		<connection>scm:git:git@github.com:kagkarlsson/db-scheduler.git</connection>
		<developerConnection>scm:git:git@github.com:kagkarlsson/db-scheduler.git</developerConnection>
		<url>https://github.com/kagkarlsson/db-scheduler/</url>
		<tag>HEAD</tag>
	</scm>

	<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>

</project>
