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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <developers>
        <developer>
            <id>lukas</id>
            <name>Lukas Krecan</name>
            <email>lukas@krecan.net</email>
        </developer>
    </developers>

    <groupId>net.javacrumbs.shedlock</groupId>
    <artifactId>shedlock-parent</artifactId>
    <name>ShedLock</name>
    <packaging>pom</packaging>
    <version>7.6.0</version>
    <modules>
        <module>shedlock-bom</module>
        <module>shedlock-core</module>
        <module>cdi/shedlock-cdi</module>
        <module>cdi/test/quarkus-test</module>
        <module>micronaut/shedlock-micronaut4</module>
        <module>micronaut/test/micronaut4-jdbc</module>
        <module>micronaut/test/micronaut4-jdbc-template</module>
        <module>spring/shedlock-spring</module>
        <module>spring/test/shedlock-springboot-old-test</module>
        <module>spring/test/shedlock-springboot-test</module>
        <module>spring/test/shedlock-springboot-future-test</module>
        <module>spring/test/shedlock-springboot-sleuth-test</module>
        <module>spring/test/shedlock-springboot-kotlin-test</module>
        <module>spring/test/shedlock-testng-test</module>
        <module>shedlock-test-support</module>
        <module>providers/etcd/shedlock-provider-etcd-jetcd</module>
        <module>providers/hazelcast/shedlock-provider-hazelcast4</module>
        <module>providers/jdbc/shedlock-test-support-jdbc</module>
        <module>providers/sql/shedlock-sql-support</module>
        <module>providers/jdbc/shedlock-provider-jdbc-internal</module>
        <module>providers/jdbc/shedlock-provider-jdbc</module>
        <module>providers/jdbc/shedlock-provider-jooq</module>
        <module>providers/jdbc/shedlock-provider-exposed</module>
        <module>providers/jdbc/shedlock-provider-jdbc-template</module>
        <module>providers/jdbc/shedlock-provider-jdbc-micronaut</module>
        <module>providers/jdbc/shedlock-provider-vertx-sqlclient</module>
        <module>providers/r2dbc/shedlock-provider-r2dbc</module>
        <module>providers/mongo/shedlock-provider-mongo</module>
        <module>providers/mongo/shedlock-provider-mongo-reactivestreams</module>
        <module>providers/elasticsearch/shedlock-provider-elasticsearch9</module>
        <module>providers/opensearch/shedlock-provider-opensearch-java</module>
        <module>providers/couchbase/shedlock-provider-couchbase-javaclient3</module>
        <module>providers/zookeeper/shedlock-provider-zookeeper-curator</module>
        <module>providers/redis/shedlock-support-redis</module>
        <module>providers/redis/shedlock-test-support-redis</module>
        <module>providers/redis/shedlock-provider-redis-jedis4</module>
        <module>providers/redis/shedlock-provider-redis-lettuce</module>
        <module>providers/redis/shedlock-provider-redis-spring</module>
        <module>providers/dynamodb/shedlock-provider-dynamodb2</module>
        <module>providers/cassandra/shedlock-provider-cassandra</module>
        <module>providers/arangodb/shedlock-provider-arangodb</module>
        <module>providers/ignite/shedlock-provider-ignite</module>
        <module>providers/inmemory/shedlock-provider-inmemory</module>
        <module>providers/memcached/shedlock-provider-memcached-spy</module>
        <module>providers/datastore/shedlock-provider-datastore</module>
        <module>providers/spanner/shedlock-provider-spanner</module>
        <module>providers/neo4j/shedlock-provider-neo4j</module>
        <module>providers/s3/shedlock-provider-s3v2</module>
        <module>providers/firestore/shedlock-provider-firestore</module>
        <module>providers/gcs/shedlock-provider-gcs</module>
        <module>providers/jetstream/shedlock-provider-jetstream</module>
    </modules>

    <properties>
        <spring.version>7.0.3</spring.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdk.version>17</jdk.version>
        <spring-boot-current.version>4.0.2</spring-boot-current.version>
        <test-containers.ver>2.0.3</test-containers.ver>
        <kotlin.ver>2.3.0</kotlin.ver>
        <micronaut4.version>4.10.7</micronaut4.version>
        <micronaut4.validation.version>4.12.0</micronaut4.validation.version>
        <micronaut4-data.version>4.8.1</micronaut4-data.version>
        <logback.ver>1.5.26</logback.ver>
        <awaitility.ver>4.3.0</awaitility.ver>
        <assertj.ver>3.27.7</assertj.ver>
        <mockito.ver>5.21.0</mockito.ver>
        <slf4j.ver>2.0.17</slf4j.ver>
        <fork.count>1</fork.count>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <java>
                        <palantirJavaFormat><version>2.74.0</version></palantirJavaFormat>
                        <removeUnusedImports />
                    </java>
                    <kotlin>
                        <ktfmt>
                            <maxWidth>120</maxWidth>
                            <style>KOTLINLANG</style>
                        </ktfmt>
                    </kotlin>
                </configuration>
                <executions>
                    <execution>
                        <id>spotless-check</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.1</version>
                <configuration>
                    <release>${jdk.version}</release>
                    <fork>true</fork>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>5.0.0</version>
                <configuration>
                    <header>header.txt</header>
                    <excludes>
                        <exclude>LICENSE.txt</exclude>
                        <exclude>*.xml</exclude>
                        <exclude>*.properties</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.4</version>
                <configuration>
                    <forkCount>${fork.count}</forkCount>
                    <argLine>-Xmx512m</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.5.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.12.0</version>
                <configuration>
                    <doclint>all,-missing</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.1.4</version>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.10.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <excludeArtifacts>
                        <artifact>shedlock-springboot-future-test</artifact>
                        <artifact>shedlock-springboot-kotlin-test</artifact>
                        <artifact>shedlock-springboot-old-test</artifact>
                        <artifact>shedlock-springboot-sleuth-test</artifact>
                        <artifact>shedlock-springboot-test</artifact>
                        <artifact>shedlock-testng-test</artifact>
                        <artifact>quarkus-test</artifact>
                        <artifact>micronaut4-jdbc</artifact>
                        <artifact>micronaut4-jdbc-template</artifact>
                        <artifact>shedlock-test-support</artifact>
                        <artifact>shedlock-test-support-jdbc</artifact>
                        <artifact>shedlock-test-support-redis</artifact>
                    </excludeArtifacts>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.2</version>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.extensions</groupId>
                <artifactId>maven-build-cache-extension</artifactId>
                <version>1.2.2</version>
            </extension>
        </extensions>
    </build>

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

    <dependencies>
        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>6.0.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <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>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <version>2.21.0</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>permit-illegal-access</id>
            <activation>
                <jdk>[16,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>--illegal-access=permit</argLine>
                            <forkCount>${fork.count}</forkCount>
                            <argLine>-Xmx512m</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- IntelliJ and ErrorProne don't play well together -->
            <id>error-prone</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.14.1</version>
                        <configuration>
                            <release>${jdk.version}</release>
                            <fork>true</fork>
                            <compilerArgs>
                                <arg>-Werror</arg>
                                <arg>-XDaddTypeAnnotationsToSymbol=true</arg>
                                <arg>-XDcompilePolicy=simple</arg>
                                <arg>--should-stop=ifError=FLOW</arg>
                                <arg>-Xplugin:ErrorProne -XepOpt:NullAway:AnnotatedPackages=net.javacrumbs.jsonunit -Xep:BadImport:OFF -Xep:ImmutableEnumChecker:OFF</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
                                <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
                                <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
                                <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
                            </compilerArgs>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>2.46.0</version>
                                </path>
                                <path>
                                    <groupId>com.uber.nullaway</groupId>
                                    <artifactId>nullaway</artifactId>
                                    <version>0.13.1</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <scm>
        <connection>scm:git:git@github.com:lukas-krecan/ShedLock.git</connection>
        <developerConnection>scm:git:git@github.com:lukas-krecan/ShedLock.git</developerConnection>
        <url>scm:git:git@github.com:lukas-krecan/ShedLock.git</url>
    </scm>
</project>
