<?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">
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>8.0.35</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.atlassian.healthcheck</groupId>
    <artifactId>atlassian-healthcheck-parent</artifactId>
    <version>10.1.0-m001-1b0a0088</version>
    <modules>
        <module>healthcheck-spi</module>
        <module>healthcheck-plugin-check-api</module>
        <module>healthcheck-plugin</module>
        <module>healthcheck-test</module>
        <module>healthcheck-in-product-test-support</module>
    </modules>
    <packaging>pom</packaging>
    <name>Atlassian HealthCheck Parent Module</name>
    <url>https://www.atlassian.com/</url>
    <inceptionYear>2012</inceptionYear>
    <issueManagement>
        <system>Jira</system>
        <url>https://ecosystem.atlassian.net/browse/AHC</url>
    </issueManagement>
    <ciManagement>
        <system>Bamboo</system>
        <url>https://engservices-bamboo.internal.atlassian.com/browse/AHC</url>
    </ciManagement>
    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/atlassian-healthcheck.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/atlassian-healthcheck.git</developerConnection>
        <url>https://bitbucket.org/atlassian/atlassian-healthcheck/</url>
        <tag>atlassian-healthcheck-parent-10.1.0-m001-1b0a0088</tag>
    </scm>
    <licenses>
        <license>
            <name>BSD License</name>
            <url>https://opensource.org/licenses/BSD-3-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>rthomas</id>
            <name>Ryan Thomas</name>
            <organization>Atlassian</organization>
            <organizationUrl>http://www.atlassian.com/</organizationUrl>
            <timezone>+10</timezone>
            <roles>
                <role>Architect</role>
            </roles>
        </developer>
        <developer>
            <id>jbirch</id>
            <name>Jason Birch</name>
            <organization>Atlassian</organization>
            <organizationUrl>http://www.atlassian.com/</organizationUrl>
            <timezone>+10</timezone>
            <roles>
                <role>Maintainer</role>
            </roles>
        </developer>
    </developers>
    <organization>
        <name>Atlassian</name>
        <url>https://www.atlassian.com/</url>
    </organization>
    <properties>
        <maven.compiler.release>25</maven.compiler.release>

        <platform.version>9.0.0-m017</platform.version>
        <amps.version>9.12.5</amps.version>
        <osgi.javaconfig.version>0.6.1</osgi.javaconfig.version>

        <!-- Test dependencies -->
        <junit.version>4.13.2</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <mockito.version>2.28.2</mockito.version>
        <jaxb.runtime.version>4.0.5</jaxb.runtime.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-public-api</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-internal-api</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-test-resources</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>atlassian-healthcheck</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.healthcheck</groupId>
                <artifactId>atlassian-healthcheck-spi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.healthcheck</groupId>
                <artifactId>atlassian-healthcheck-plugin-check-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>atlassian-healthcheck-in-product-test-support</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>healthcheck-reference-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>healthcheck-deliberately-broken-test-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>healthcheck-deliberately-not-loadable-test-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>healthcheck-disabled-by-default-test-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
                <version>${osgi.javaconfig.version}</version>
            </dependency>
            <!-- Test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>${jaxb.runtime.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                    <configuration>
                        <containerId>tomcat10x</containerId>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.43.0</version>
                <configuration>
                    <java>
                        <palantirJavaFormat>
                            <version>2.28.0</version>
                        </palantirJavaFormat>
                        <importOrder>
                            <wildcardsLast>true</wildcardsLast>
                            <order>java|javax|jakarta,lombok,org.spring|org|com|io,,com.atlassian,com.atlassian.beacon|\#,\#com.atlassian</order>
                        </importOrder>
                        <removeUnusedImports />
                    </java>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.atlassian.maven.enforcer</groupId>
                        <artifactId>maven-enforcer-rules</artifactId>
                        <version>1.5.19</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>ban-milestones-and-release-candidates</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banVersionDeps>
                                    <ignoreProvided>true</ignoreProvided>
                                </banVersionDeps>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>postgres84</id>
            <properties>
                <postgres.wait.condition>database system is ready to accept connections</postgres.wait.condition>
            </properties>
        </profile>
        <profile>
            <id>postgres95</id>
            <properties>
                <postgres.wait.condition>PostgreSQL init process complete; ready for start up.</postgres.wait.condition>
            </properties>
        </profile>
        <profile>
            <!-- Postgres-in-Docker config for JIRA Cloud, which is Postgres-only.
                 Use together with 'postgres84' or 'postgres95' profile. -->
            <id>jira-cloud</id>
            <properties>
                <!-- The pass-through port at which docker-maven-plugin will expose the real postgres, see below -->
                <postgres.port>15432</postgres.port>
                <postgres.dbname>jira</postgres.dbname>
                <postgres.user>jira</postgres.user>
                <postgres.password>jira</postgres.password>
                <postgres.jdbc.driver.version>9.2-1003-jdbc4</postgres.jdbc.driver.version>
                <!-- This may be set by Bamboo plans on JCBAC -->
                <postgres.docker.image>docker.atlassian.io/armata/postgres/8.4/jira/1000</postgres.docker.image>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                    <version>${postgres.jdbc.driver.version}</version>
                </dependency>
            </dependencies>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- Postgres running in docker, configured to start/stop with integration tests
                             where docker-maven-plugin is activated in submodules -->
                        <plugin>
                            <groupId>io.fabric8</groupId>
                            <artifactId>docker-maven-plugin</artifactId>
                            <version>0.43.0</version>
                            <configuration>
                                <images>
                                    <image>
                                        <alias>postgres-db</alias>
                                        <name>${postgres.docker.image}</name>
                                        <run>
                                            <env>
                                                <POSTGRES_USER>${postgres.user}</POSTGRES_USER>
                                                <POSTGRES_PASSWORD>${postgres.password}</POSTGRES_PASSWORD>
                                                <POSTGRES_DB>${postgres.dbname}</POSTGRES_DB>
                                                <POSTGRES_INITDB_ARGS>--encoding=UTF8</POSTGRES_INITDB_ARGS>
                                            </env>
                                            <ports>
                                                <port>${postgres.port}:5432</port>
                                            </ports>
                                            <wait>
                                                <log>${postgres.wait.condition}</log>
                                                <time>45000</time>
                                                <kill>5000</kill>
                                                <shutdown>2000</shutdown>
                                            </wait>
                                            <log>
                                                <prefix>postgres</prefix>
                                                <date>default</date>
                                                <color>cyan</color>
                                            </log>
                                        </run>
                                    </image>
                                </images>
                                <verbose>true</verbose>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>start</id>
                                    <!-- TODO: This should be in "pre-integration-test" phase,
                                         but AMPS loads its systemPropertyVariables config in "test" phase,
                                         and we need the docker.host.address variable there,
                                         so unfortunately we're forced to start Docker before "test",
                                         hence this is the latest phase that works. Please change when AMPS is gone! -->
                                    <phase>process-test-classes</phase>
                                    <goals>
                                        <goal>start</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>stop</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>stop</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
