<?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>6.3.1</version>
        <relativePath />
    </parent>
    <groupId>com.atlassian.activeobjects</groupId>
    <artifactId>activeobjects-plugin-parent-pom</artifactId>
    <version>6.1.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-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/activeobjects.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:server-platform/activeobjects.git</developerConnection>
        <url>https://bitbucket.org/server-platform/activeobjects</url>
        <tag>v6.1.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/AO</url>
    </ciManagement>
    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <platform.version>7.0.6</platform.version>
        <junit.version>4.13.2</junit.version>
        <mockito.version>2.28.2</mockito.version>
        <hamcrest.version>1.4-atlassian-1</hamcrest.version>
        <powermock.version>2.0.9</powermock.version>
        <amps.version>8.16.0</amps.version>
        <hsqldb.version>1.8.1.1</hsqldb.version>
        <!-- HSQL 2.x: use hsqldb.groupid = 'org.hsqldb' -->
        <hsqldb.groupid>hsqldb</hsqldb.groupid>
        <refapp.version>${platform.version}</refapp.version>
        <spring.osgi.core.version>1.2.1</spring.osgi.core.version>
        <plugins.osgi.version>7.0.0</plugins.osgi.version>
        <atlassian.osgi.javaconfig.version>0.4.0</atlassian.osgi.javaconfig.version>
        <atlassian.beehive.version>0.2.2</atlassian.beehive.version>
        <atlassian.profiling.version>3.6.1</atlassian.profiling.version>
        <sal.api.compatibility.version>4.0.0</sal.api.compatibility.version>
        <jacoco.report.file>../jacoco-aggregator/target/site/jacoco-aggregate/jacoco.xml</jacoco.report.file>
        <jvm.opens />
    </properties>
    <dependencyManagement>
        <dependencies>
            <!-- Platform modules -->
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-public-api</artifactId>
                <version>${platform.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-deprecated-public-api</artifactId>
                <version>${platform.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-internal-api</artifactId>
                <version>${platform.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-test-resources</artifactId>
                <version>${platform.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
                <version>${atlassian.osgi.javaconfig.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.activeobjects</groupId>
                <artifactId>activeobjects</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.activeobjects</groupId>
                <artifactId>activeobjects-builder</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.activeobjects</groupId>
                <artifactId>activeobjects-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.activeobjects</groupId>
                <artifactId>activeobjects-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.activeobjects</groupId>
                <artifactId>activeobjects-integration-test-model</artifactId>
                <version>${project.version}</version>
            </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-plugin</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>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito2</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </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.codehaus.woodstox</groupId>
                <artifactId>woodstox-core-asl</artifactId>
                <version>4.4.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.xml.stream</groupId>
                        <artifactId>stax-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>${hsqldb.groupid}</groupId>
                <artifactId>hsqldb</artifactId>
                <version>${hsqldb.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.osgi</groupId>
                <artifactId>spring-osgi-core</artifactId>
                <version>${spring.osgi.core.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.7.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>5.1.9</version>
                    <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>
                        <server>localhost</server>
                        <log4jProperties>src/aps/log4j.properties</log4jProperties>
                        <extractDependencies>true</extractDependencies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>io.fabric8</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>0.36.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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
            </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>
    <profiles>
        <profile>
            <id>jvm.opens.activation</id>
            <activation>
                <jdk>[17,)</jdk>
            </activation>
            <properties>
                <jvm.opens>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED</jvm.opens>
            </properties>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jacoco</id>
            <properties>
                <jacoco.include.pattern>com/atlassian/activeobjects/**</jacoco.include.pattern>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>agent-for-ut</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>jacoco.agent.argLine</propertyName>
                                    <includes>
                                        <include>net/java/ao/**</include>
                                        <include>com/atlassian/activeobjects/**</include>
                                    </includes>
                                </configuration>
                            </execution>
                            <execution>
                                <id>agent-for-it</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>prepare-agent-integration</goal>
                                </goals>
                                <configuration>
                                    <propertyName>jacoco.agent.it.argLine</propertyName>
                                    <includes>
                                        <include>net/java/ao/**</include>
                                        <include>com/atlassian/activeobjects/**</include>
                                    </includes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>@{jacoco.agent.argLine}</argLine>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <argLine>@{jacoco.agent.it.argLine}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
