<?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>5.0.24</version>
    </parent>

    <groupId>com.atlassian.frontend</groupId>
    <artifactId>atlassian-frontend-runtime-plugin</artifactId>
    <version>0.3.0</version>

    <name>Atlassian Front-End Runtime Plugin</name>
    <description>Provides various polyfills and runtimes to enable use of modern browser APIs in Atlassian's supported browsers.</description>
    <url>https://bitbucket.org/atlassianlabs/atlassian-frontend-runtime-plugin</url>
    <packaging>atlassian-plugin</packaging>

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

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassianlabs/atlassian-frontend-runtime-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassianlabs/atlassian-frontend-runtime-plugin.git</developerConnection>
        <url>https://bitbucket.org/atlassianlabs/atlassian-frontend-runtime-plugin</url>
        <tag>atlassian-frontend-runtime-plugin-0.3.0</tag>
    </scm>

    <issueManagement>
        <url>https://bitbucket.org/atlassianlabs/atlassian-frontend-runtime-plugin/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <dependencies>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <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.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${frontend.maven.plugin.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${frontend.maven.plugin.version}</version>
                <configuration>
                    <installDirectory>${project.build.directory}</installDirectory>
                    <workingDirectory>${project.basedir}</workingDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install node and yarn</id>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <phase>initialize</phase>
                        <inherited>false</inherited>
                    </execution>
                    <execution>
                        <id>yarn install</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>${frontend.install.cmd}</arguments>
                        </configuration>
                        <phase>initialize</phase>
                        <inherited>false</inherited>
                    </execution>
                    <execution>
                        <id>webpack build</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>build</arguments>
                        </configuration>
                        <phase>process-resources</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>refapp-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${refapp.version}</productVersion>
                    <extractDependencies>false</extractDependencies>
                    <skipManifestValidation>true</skipManifestValidation>
                    <enableQuickReload>true</enableQuickReload>
                    <closureJsCompiler>false</closureJsCompiler>
                    <compressJs>false</compressJs>

                    <!-- See here for an explanation of default instructions: -->
                    <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Atlassian-Scan-Folders>META-INF/plugin-descriptors</Atlassian-Scan-Folders>
                        <Spring-Context>*</Spring-Context>
                        <Export-Package>
                            com.atlassian.frontend.obr.install
                        </Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <configuration>
                        <nodeVersion>${node.version}</nodeVersion>
                        <yarnVersion>${yarn.version}</yarnVersion>
                        <installDirectory>${node.path}</installDirectory>
                        <npmInheritsProxyConfigFromMaven>true</npmInheritsProxyConfigFromMaven>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <properties>
        <platform.version>5.0.0</platform.version>
        <refapp.version>5.0.0</refapp.version>
        <amps.version>8.0.0</amps.version>

        <frontend.maven.plugin.version>1.6</frontend.maven.plugin.version>
        <frontend.install.cmd>install --frozen-lockfile --prefer-offline --mutex network --no-progress</frontend.install.cmd>
        <node.path>${project.build.directory}</node.path>
        <!-- Keep these values in sync with the package.json file -->
        <node.version>v10.15.1</node.version>
        <yarn.version>v1.13.0</yarn.version>

        <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

</project>
