<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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.playtika.testcontainers</groupId>
    <artifactId>testcontainers-spring-boot</artifactId>
    <version>3.1.20</version>
    <packaging>pom</packaging>

    <name>testcontainers-spring-boot</name>
    <description>Container auto-configurations for spring-boot based integration tests</description>
    <url>https://github.com/PlaytikaOSS/testcontainers-spring-boot</url>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Playtika</name>
            <organization>Playtika</organization>
            <organizationUrl>https://www.playtika.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/PlaytikaOSS/testcontainers-spring-boot</url>
        <connection>scm:git:git://github.com/PlaytikaOSS/testcontainers-spring-boot.git</connection>
        <developerConnection>scm:git:git@github.com:PlaytikaOSS/testcontainers-spring-boot.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>testcontainers-spring-boot-bom</module>
        <module>testcontainers-spring-boot-parent</module>
        <module>testcontainers-common</module>
        <module>embedded-kafka</module>
        <module>embedded-native-kafka</module>
        <module>embedded-keycloak</module>
        <module>embedded-keydb</module>
        <module>embedded-aerospike</module>
        <module>embedded-mariadb</module>
        <module>embedded-memsql</module>
        <module>embedded-mongodb</module>
        <module>embedded-redis</module>
        <module>embedded-neo4j</module>
        <module>embedded-postgresql</module>
        <module>embedded-elasticsearch</module>
        <module>embedded-opensearch</module>
        <module>embedded-dynamodb</module>
        <module>embedded-rabbitmq</module>
        <module>embedded-minio</module>
        <module>embedded-google-pubsub</module>
        <module>embedded-google-storage</module>
        <module>embedded-influxdb</module>
        <module>embedded-vault</module>
        <module>embedded-oracle-xe</module>
        <module>embedded-mysql</module>
        <module>embedded-localstack</module>
        <module>embedded-cassandra</module>
        <module>embedded-clickhouse</module>
        <module>embedded-selenium</module>
        <module>embedded-pulsar</module>
        <module>embedded-vertica</module>
        <module>embedded-prometheus</module>
        <module>embedded-grafana</module>
        <module>embedded-consul</module>
        <module>embedded-db2</module>
        <module>embedded-artifactory</module>
        <module>embedded-azurite</module>
        <module>embedded-toxiproxy</module>
        <module>embedded-mssqlserver</module>
        <module>embedded-victoriametrics</module>
        <module>embedded-nats</module>
        <module>embedded-k3s</module>
        <module>embedded-mockserver</module>
        <module>embedded-solr</module>
        <module>embedded-cockroachdb</module>
        <module>embedded-git</module>
        <module>embedded-zookeeper</module>
        <module>embedded-couchbase</module>
        <module>embedded-wiremock</module>
        <module>embedded-mailhog</module>
        <module>embedded-aerospike-enterprise</module>
        <module>embedded-spicedb</module>
        <module>embedded-temporal</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <maven.source.plugin.version>3.4.0</maven.source.plugin.version>
        <maven.enforcer.plugin.version>3.6.2</maven.enforcer.plugin.version>
        <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
        <exec-maven-plugin.version>3.6.3</exec-maven-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
        <maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
        <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
        <versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
        <spotless-maven-plugin.version>3.2.1</spotless-maven-plugin.version>
        <gitflow-incremental-builder.version>4.5.1</gitflow-incremental-builder.version>
        <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>

        <!-- GPG -->
        <gpg.keyname>3EEF24C7</gpg.keyname>
        <gpg.defaultKeyring>false</gpg.defaultKeyring>
        <gpg.useagent>true</gpg.useagent>
        <gpg.lockMode>never</gpg.lockMode>

        <docker.cleanup.skip>true</docker.cleanup.skip>
        <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
    </properties>

    <profiles>
        <profile>
            <id>docker-clean</id>
            <properties>
                <docker.cleanup.skip>false</docker.cleanup.skip>
            </properties>
        </profile>
        <profile>
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>central</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${central-publishing-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <parameters>true</parameters>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${exec-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>docker-cleanup</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>./docker_cleanup.sh</executable>
                    <skip>${docker.cleanup.skip}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>log4j:log4j</exclude>
                                        <exclude>org.slf4j:slf4j-log4j12</exclude>
                                        <exclude>org.springframework.boot:spring-boot-starter-logging</exclude>
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <exclude>ch.qos.logback:logback-core</exclude>
                                        <exclude>ch.qos.logback:logback-classic</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</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>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doclint>none</doclint>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>${spotless-maven-plugin.version}</version>
                <configuration>
                    <java>
                        <removeUnusedImports />
                        <trimTrailingWhitespace />
                        <importOrder>
                            <order>,javax,java,\#</order>
                        </importOrder>
                        <indent>
                            <spaces>true</spaces>
                            <spacesPerTab>4</spacesPerTab>
                        </indent>
                    </java>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.github.gitflow-incremental-builder</groupId>
                <artifactId>gitflow-incremental-builder</artifactId>
                <version>${gitflow-incremental-builder.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <disableIfBranchMatches>develop|support/*</disableIfBranchMatches>
                    <fetchReferenceBranch>true</fetchReferenceBranch>
                    <referenceBranch>refs/remotes/origin/develop</referenceBranch>
                    <buildUpstream>always</buildUpstream>
                    <skipTestsForUpstreamModules>true</skipTestsForUpstreamModules>
                    <buildUpstreamMode>impacted</buildUpstreamMode>
                    <skipIfPathMatches>\.github[/\\].*|\.mvn[/\\].*|mvnw.*</skipIfPathMatches>
                    <!-- Ignores Readme changes in parent or any submodule-->
                    <excludePathsMatching>(.*[/\\])?README.adoc</excludePathsMatching>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>5.0.0</version>
                <configuration>
                    <mapping>
                        <txt>SMILEY_STYLE</txt>
                    </mapping>
                    <licenseSets>
                        <licenseSet>
                            <header>LICENSE</header>
                            <excludes>
                                <exclude>src/test/resources/**</exclude>
                                <exclude>src/main/resources/**</exclude>
                                <exclude>**/*.adoc</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                    <defaultInlineHeaderStyles>
                        <defaultInlineHeaderStyle>
                            <name>SMILEY_STYLE</name>
                            <firstLine>:(</firstLine>
                            <beforeEachLine> ( </beforeEachLine>
                            <endLine>:(</endLine>
                            <firstLineDetectionPattern>\:\(</firstLineDetectionPattern>
                            <lastLineDetectionPattern>\:\(</lastLineDetectionPattern>
                            <allowBlankLines>false</allowBlankLines>
                            <multiLine>false</multiLine>
                        </defaultInlineHeaderStyle>
                    </defaultInlineHeaderStyles>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
