<?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>com.atlassian.pom</groupId>
        <artifactId>closedsource-private-pom</artifactId>
        <version>6.3.6</version>
    </parent>
    <groupId>com.atlassian.config</groupId>
    <artifactId>atlassian-config-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.0.2</version>
    <name>Atlassian Config</name>
    <description>Basic application configuration classes.</description>
    <url>https://www.atlassian.com</url>
    <inceptionYear>2006</inceptionYear>
    <scm>
        <connection>scm:git:git@bitbucket.org:atlassian/dc-platform-closed-source.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:atlassian/dc-platform-closed-source.git</developerConnection>
        <url>https://bitbucket.org/atlassian/dc-platform-closed-source</url>
        <tag>atlassian-config-parent-2.0.2</tag>
    </scm>
    <issueManagement>
        <system>jira</system>
        <url>https://ecosystem.atlassian.net/projects/ACONF</url>
    </issueManagement>
    <ciManagement>
        <system>bamboo</system>
        <url>https://ecosystem-bamboo.internal.atlassian.com/browse/ACONF</url>
    </ciManagement>
    <distributionManagement>
        <site>
            <id>atlassian-documentation</id>
            <url>
                scpexe://docs-app.internal.atlassian.com/var/www/domains/docs.atlassian.com/${project.artifactId}/${project.version}
            </url>
        </site>
    </distributionManagement>
    <modules>
        <module>atlassian-config</module>
        <module>atlassian-config-internal</module>
    </modules>
    <properties>
        <commons.io.version>2.13.0</commons.io.version>
        <commons.lang3.version>3.12.0</commons.lang3.version>
        <platform.version>7.0.6</platform.version>
        <dom4j.version>2.1.4</dom4j.version>
        <jaxen.version>1.1.6</jaxen.version>
        <hamcrest.version>2.2</hamcrest.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>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.28.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <profiles>
        <profile>
            <id>silent-tests</id>
            <dependencies>
                <!-- this for the tests to run with an implementation of slf4j-api, this will > /dev/null all logs -->
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-nop</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>noisy-tests</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-checkstyle-suppressions</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/target/codestyle</outputDirectory>
                            <overwrite>true</overwrite>
                            <resources>
                                <resource>
                                    <directory>${maven.multiModuleProjectDirectory}/codestyle</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>ban_conflicting_dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>Make sure that these older dependencies don't sneak back in</message>
                                    <excludes>
                                        <exclude>javax.servlet:servlet-api</exclude>
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <exclude>commons-lang:commons-lang</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.drs</groupId>
                <artifactId>dependency-report-maven-plugin</artifactId>
                <version>1.5.13</version>
                <configuration>
                    <project>atlassian-config</project>
                    <gracefulFailure>true</gracefulFailure>
                </configuration>
                <executions>
                    <execution>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>upload</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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,lombok,org.spring|org|com|io,,com.atlassian,com.atlassian.beacon|\#,\#com.atlassian</order>
                        </importOrder>
                        <removeUnusedImports />
                    </java>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
