<?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>public-pom</artifactId>
        <version>5.0.26</version>
    </parent>

    <groupId>com.atlassian.activeobjects</groupId>
    <artifactId>activeobjects-plugin-parent-pom</artifactId>
    <version>3.2.2</version>
    <packaging>pom</packaging>

    <name>ActiveObjects Plugin - Parent POM</name>
    <description>Integrates ActiveObjects as a plugin into the Atlassian product suite.</description>
    <url>https://ecosystem.atlassian.net/browse/AO</url>
    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <modules>
        <module>activeobjects-core</module>
        <module>activeobjects-spi</module>
        <module>activeobjects-dbex</module>
        <module>activeobjects-confluence-spi</module>
        <module>activeobjects-jira-spi</module>
        <module>activeobjects-plugin</module>
        <module>activeobjects-test</module>
        <module>activeobjects-test-model</module>
        <module>activeobjects-test-plugin</module>
    </modules>

    <scm>
        <connection>scm:git:git@bitbucket.org:server-platform/ao-plugin.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:server-platform/ao-plugin.git</developerConnection>
        <url>https://bitbucket.org/server-platform/ao-plugin</url>
        <tag>activeobjects-plugin-parent-pom-3.2.2</tag>
    </scm>
    <issueManagement>
        <system>Jira</system>
        <url>https://ecosystem.atlassian.net/browse/AO</url>
    </issueManagement>
    <ciManagement>
        <system>Bamboo</system>
        <url>https://ecosystem-bamboo.internal.atlassian.com/browse/AOPLUG</url>
    </ciManagement>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>

        <amps.version>8.0.2</amps.version>
        <ao.version>3.2.2</ao.version>
        <platform.version>5.0.0</platform.version>

        <hsqldb.version>1.8.0.7</hsqldb.version>
        <jaxb.version>2.3.0</jaxb.version>
        <refapp.version>5.0.2</refapp.version>

        <spring.osgi.version>[5.0, 6)</spring.osgi.version>
        <plugins.osgi.version>4.0.0</plugins.osgi.version>
        <webresource.osgi.version>4.0.0</webresource.osgi.version>
        <webfragments.osgi.version>5.0.0</webfragments.osgi.version>

        <atlassian.selenium.version>2.5.0</atlassian.selenium.version>
        <atlassian.beehive.version>0.1.3</atlassian.beehive.version>

        <sal.api.compatibility.version>4.0.0</sal.api.compatibility.version>
        <tenancy.api.compatibility.version>3.0.0</tenancy.api.compatibility.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Platform modules -->
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>platform</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>third-party</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-dbex</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-jira-spi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-spi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-test-model</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.activeobjects</groupId>
                <artifactId>activeobjects</artifactId>
                <version>${ao.version}</version>
            </dependency>

            <dependency>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>${hsqldb.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>${jaxb.version}</version>
            </dependency>

            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.15</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.jdmk</groupId>
                        <artifactId>jmxtools</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.sun.jmx</groupId>
                        <artifactId>jmxri</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.jms</groupId>
                        <artifactId>jms</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.atlassian.beehive</groupId>
                <artifactId>beehive-api</artifactId>
                <version>${atlassian.beehive.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.woodstox</groupId>
                <artifactId>woodstox-core-asl</artifactId>
                <version>4.2.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.xml.stream</groupId>
                        <artifactId>stax-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.twdata.maven</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>1.0-beta-2-db2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <excludes>
                            <exclude>it*/**</exclude>
                            <exclude>**/*$*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <products>
                            <product>
                                <id>refapp</id>
                                <version>${refapp.version}</version>
                            </product>
                        </products>
                        <log4jProperties>src/aps/log4j.properties</log4jProperties>
                        <extractDependencies>true</extractDependencies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>io.fabric8</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>0.17.1</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-dispatcher-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                </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>Ensure google-collections is not included transitively.</message>
                                        <excludes>
                                            <exclude>com.google.collections:google-collections</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                </rules>
                                <fail>true</fail>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <!-- Temporarily disable the hammer while we're building milestones -->
                    <execution>
                        <id>ban-milestones-and-release-candidates</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
