<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>8.0.30</version>
    </parent>

    <groupId>com.atlassian.auinext</groupId>
    <artifactId>workspace</artifactId>
    <packaging>pom</packaging>
    <version>11.0.0</version>
    <name>AUI Next - Parent</name>
    <url>https://bitbucket.org/atlassian/aui</url>

    <organization>
        <name>Atlassian Pty Ltd.</name>
        <url>https://www.atlassian.com/</url>
    </organization>

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/aui.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/aui.git</developerConnection>
        <url>https://bitbucket.org/atlassian/aui</url>
    </scm>

    <issueManagement>
        <system>JIRA</system>
        <url>https://ecosystem.atlassian.net/browse/AUI</url>
    </issueManagement>

    <ciManagement>
        <system>Bamboo</system>
        <url>https://ecosystem-bamboo.internal.atlassian.com/browse/AUI</url>
    </ciManagement>

    <licenses>
        <license>
            <name>Atlassian Developer Terms</name>
            <url>https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/</url>
            <distribution>repo</distribution>
            <comments>Refer to licenses directory for full licensing details about AUI and the libraries bundled in AUI.</comments>
        </license>
    </licenses>

    <modules>
        <module>p2/p2-plugin</module>
        <module>p2/p2-harness</module>
        <module>p2/p2-soy</module>
    </modules>

    <properties>
        <!-- This requires .mvn folder to be present in the root of the maven project -->
        <aui.project.root.dir>${maven.multiModuleProjectDirectory}</aui.project.root.dir>

        <!-- Frontend build stuff. Keep in sync with package.json engines -->
        <node.path>${project.build.directory}</node.path>
        <yarn.version>v1.22.22</yarn.version>
        <frontend.install.cmd>install --frozen-lockfile</frontend.install.cmd>
        <frontend.maven.plugin.version>1.15.1-atlassian-6</frontend.maven.plugin.version>

        <!-- License checking -->
        <license-maven-plugin.version>3.0.2</license-maven-plugin.version>

        <!-- Boring platform stuff -->
        <platform.version>9.0.0-m021</platform.version>
        <refapp.version>${platform.version}</refapp.version>
        <amps.version>9.13.0</amps.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
        <atl-dark-features.version>2.2.0</atl-dark-features.version>

        <!-- The platform APIs we compile against are milestone builds. -->
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-deprecated-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-public-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>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Only used for development -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-dark-features-rest-plugin</artifactId>
            <version>${atl-dark-features.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-dark-features-ui-plugin</artifactId>
            <version>${atl-dark-features.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- Stupid base POM gets in the way of this working -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                    <configuration>
                        <enableQuickReload>true</enableQuickReload>
                        <compressResources>false</compressResources>
                        <bundledArtifacts>
                            <bundledArtifact>
                                <groupId>com.atlassian.plugins</groupId>
                                <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                <version>${atl-dark-features.version}</version>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>com.atlassian.plugins</groupId>
                                <artifactId>atlassian-dark-features-ui-plugin</artifactId>
                                <version>${atl-dark-features.version}</version>
                            </bundledArtifact>
                        </bundledArtifacts>
                        <products>
                            <product>
                                <id>refapp</id>
                                <version>${refapp.version}</version>
                            </product>
                        </products>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>${frontend.maven.plugin.version}</version>
                    <configuration>
                        <yarnVersion>${yarn.version}</yarnVersion>
                        <installDirectory>${node.path}</installDirectory>
                        <npmInheritsProxyConfigFromMaven>true</npmInheritsProxyConfigFromMaven>
                        <workingDirectory>${aui.project.root.dir}</workingDirectory>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license-maven-plugin.version}</version>
                    <configuration>
                        <!-- Test-harness-only deps with no entry in the central license repo.
                             They are not shipped in auiplugin, so we ignore their trees until its in the license repo. -->
                        <ignoredArtifactsTrees>org.webjars:sinonjs</ignoredArtifactsTrees>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <!-- License checking is opt-in so the refapp harness build never runs (and hangs on) it.
             Run it explicitly via: mvn verify -Plicense-check (see yarn license/check-maven). -->
        <profile>
            <id>license-check</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check-licenses</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
