<?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.applinks</groupId>
        <artifactId>applinks-parent</artifactId>
        <version>7.3.0</version>
    </parent>

    <artifactId>applinks-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Applinks - Plugin - Core</name>
    <description>[PUBLIC] Atlassian Application Links core plugin. Application Links facilitates discovery, connections and
        authentication of Atlassian products with remote applications.</description>

    <properties>
        <!-- override these to support multiple instances without clashing -->
        <applinks.build.directory>${basedir}/target</applinks.build.directory>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <context.path>/refapp1</context.path>
        <!-- for amps:cli -->
        <http.port>5990</http.port>
        <jvm.debug.port>5001</jvm.debug.port>
        <node.version>12.22.6</node.version>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.frontend</groupId>
            <artifactId>atlassian-frontend-runtime-plugin</artifactId>
            <version>0.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>

        <!-- Applinks dependencies -->
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-host</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-spi</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Atlassian dependencies -->
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- The status API requires dependency on OAuth -->
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-consumer-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-module</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.velocity.htmlsafe</groupId>
            <artifactId>velocity-htmlsafe</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-text</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-spring</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-localhost</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.http</groupId>
            <artifactId>atlassian-http</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- To support legacy Confluence action for managing space links -->
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <scope>provided</scope>
            <exclusions>
                <!-- In order to be able to use slf4j-nop for tests, this must be excluded -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian</groupId>
                    <artifactId>fugue</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.octo.captcha</groupId>
                    <artifactId>jcaptcha-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.sal</groupId>
                    <artifactId>sal-spi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.security.auth.trustedapps</groupId>
                    <artifactId>atlassian-trusted-apps-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <!-- security-related exclusions-->
                <exclusion>
                    <groupId>com.atlassian.bonnie</groupId>
                    <artifactId>atlassian-bonnie</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.botocss</groupId>
                    <artifactId>botocss-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.core</groupId>
                    <artifactId>atlassian-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.crowd</groupId>
                    <artifactId>crowd-password-encoders</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.filestore</groupId>
                    <artifactId>dt-filestore-httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.media</groupId>
                    <artifactId>dt-media-api-httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.kristofa</groupId>
                    <artifactId>brave-apache-http-interceptors</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.kristofa</groupId>
                    <artifactId>brave-web-servlet-filter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.mchange</groupId>
                    <artifactId>c3p0</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.thoughtworks.xstream</groupId>
                    <artifactId>xstream</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-fileupload</groupId>
                    <artifactId>commons-fileupload</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-compress</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.xmlgraphics</groupId>
                    <artifactId>batik-codec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.xmlgraphics</groupId>
                    <artifactId>batik-transcoder</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcmail-jdk15on</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk15on</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.ldap</groupId>
                    <artifactId>spring-ldap-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.datatype</groupId>
                    <artifactId>jackson-datatype-joda</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-text</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.mail</groupId>
                    <artifactId>atlassian-mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>javax.mail-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- 3rd party dependencies -->
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Test dependencies - Applinks -->
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-test-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-common</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <!-- Test dependencies - Atlassian -->
        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-sal-plugin</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.security.auth.trustedapps</groupId>
                    <artifactId>atlassian-trusted-apps-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.sal</groupId>
                    <artifactId>sal-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.sal</groupId>
                    <artifactId>sal-spi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.sal</groupId>
                    <artifactId>sal-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test dependencies - 3rd party -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <!-- Force commons-lang to test scope to ensure runtime code never uses it, even transitively -->
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-memory</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.3.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>1.5.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jaxb-annotations</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <directory>${applinks.build.directory}</directory>
        <plugins>
            <!-- Runner plugins need to be explicitly defined here to pick up the parent configuration, because AMPS -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <!-- Run Karma tests -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.1.1</version>
                <executions>
                    <execution>
                        <id>run-npm-install</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>generate-test-resources</phase>
                        <configuration>
                            <workingDirectory>etc/karma-runner</workingDirectory>
                            <executable>npm</executable>
                            <arguments>
                                <argument>install</argument>
                            </arguments>
                            <skip>${skip.unit.tests}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <id>run-javascript-unit-tests</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <workingDirectory>etc/karma-runner</workingDirectory>
                            <executable>npm</executable>
                            <arguments>
                                <argument>test</argument>
                            </arguments>
                            <skip>${skip.unit.tests}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                    <systemPropertyVariables>
                        <!--
                            We need to tell AMPS to stop looking at our source now, otherwise
                            if we run `atlas-run` or `atlas-debug` to check our plugin, it will
                            load our code out of src/main/resources, which would be very confusing!
                        -->
                        <plugin.resource.directories>${project.build.outputDirectory}</plugin.resource.directories>
                    </systemPropertyVariables>
                    <compressResources>false</compressResources>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            <!-- Atlassian Product imports -->
                            com.atlassian.confluence.*;resolution:=optional,
                            <!-- Used by webfragment conditions in atlassian-plugin.xml -->
                            com.atlassian.confluence.plugin.descriptor.web.conditions;resolution:=optional,
                            com.atlassian.bamboo.*;resolution:=optional,
                            com.atlassian.jira.*;resolution:=optional,
                            <!-- Used by webfragment conditions in atlassian-plugin.xml -->
                            com.atlassian.jira.plugin.webfragment.conditions;resolution:=optional,
                            <!-- Optional libraries -->
                            com.atlassian.analytics.api.annotations*;resolution:=optional,
                            com.atlassian.net.*;resolution:=optional,
                            com.atlassian.xwork.*;resolution:=optional,
                            com.opensymphony.*;resolution:=optional,
                            <!-- Exclusions for dead references or unused code paths -->
                            !com.atlassian.annotations.*,
                            !nu.xom,
                            !org.joda.convert.*,
                            *
                        </Import-Package>
                        <!-- NOTE: those is all _internal_ packages from applinks-common, exported to share with other
                             applinks plugins. The actual Applinks APIs/SPIs are exported by the host product. -->
                        <!-- Over time all the packages below should be collapsed into
                             com.atlassian.applinks.internal.common -->
                        <Export-Package>com.atlassian.applinks.internal.status.*,
                            com.atlassian.applinks.internal.common.*,
                            com.atlassian.applinks.internal.rest.*,
                            com.atlassian.applinks.internal.application.*,
                            com.atlassian.applinks.application.*,
                            com.atlassian.applinks.core.*,
                            com.atlassian.applinks.ui.*</Export-Package>
                        <_noee>true</_noee>
                        <Atlassian-Scan-Folders>META-INF/plugin-descriptors</Atlassian-Scan-Folders>
                    </instructions>
                    <products>
                        <product>
                            <id>refapp</id>
                            <version>${refapp.version}</version>
                        </product>
                    </products>
                    <libArtifacts>
                        <libArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>applinks-api</artifactId>
                        </libArtifact>
                        <libArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>applinks-host</artifactId>
                        </libArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.applinks</groupId>
                            <artifactId>applinks-spi</artifactId>
                        </libArtifact>
                    </libArtifacts>
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-api</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-consumer-spi</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-service-provider-spi</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-consumer-sal-plugin</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-consumer-plugin</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-service-provider-plugin</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-service-provider-sal-plugin</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth</groupId>
                            <artifactId>atlassian-oauth-admin-plugin</artifactId>
                        </pluginArtifact>
                    </pluginArtifacts>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.kongchen</groupId>
                <artifactId>swagger-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.6.1-atlassian-1</version>
                <configuration>
                    <nodeVersion>v${node.version}</nodeVersion>
                    <environmentVariables>
                        <BABEL_ENV>webpack</BABEL_ENV>
                    </environmentVariables>
                </configuration>
                <executions>
                    <execution>
                        <!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <!-- optional: default phase is "generate-resources" -->
                        <phase>generate-resources</phase>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <inherited>false</inherited>
                        <configuration>
                            <skip>${skipNpmInstall}</skip>
                            <arguments>ci</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <skip>${skipNpmInstall}</skip>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- The profiles below can be used for running mvn amps:cli against any instance started from AMPS with
            default config, e.g. mvn amps:cli -Pjira -->
        <profile>
            <id>refapp2</id>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp2</applinks.build.directory>
                <context.path>/refapp2</context.path>
                <http.port>5992</http.port>
                <jvm.debug.port>5002</jvm.debug.port>
            </properties>
        </profile>
        <profile>
            <id>refapp3</id>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp3</applinks.build.directory>
                <context.path>/refapp2</context.path>
                <http.port>5993</http.port>
                <jvm.debug.port>5003</jvm.debug.port>
            </properties>
        </profile>
        <profile>
            <id>jira</id>
            <properties>
                <context.path>/jira</context.path>
                <http.port>2990</http.port>
            </properties>
        </profile>
        <profile>
            <id>confluence</id>
            <properties>
                <context.path>/confluence</context.path>
                <http.port>1990</http.port>
            </properties>
        </profile>
        <profile>
            <id>bitbucket</id>
            <properties>
                <context.path>/bitbucket</context.path>
                <http.port>7990</http.port>
            </properties>
        </profile>
        <profile>
            <id>bamboo</id>
            <properties>
                <context.path>/bamboo</context.path>
                <http.port>6990</http.port>
            </properties>
        </profile>
        <profile>
            <id>fecru</id>
            <properties>
                <context.path>/fecru</context.path>
                <http.port>3990</http.port>
            </properties>
        </profile>

        <profile>
            <id>api-compat</id>
            <activation>
                <property>
                    <name>api-compat</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>api-compat-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>frontend-watch-prepare</id>
            <activation>
                <property>
                    <name>frontend-watch-prepare</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>npm-watch-prepare</id>
                                <goals>
                                    <goal>npm</goal>
                                </goals>
                                <phase>generate-resources</phase>
                                <configuration>
                                    <arguments>run watch:prepare</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>
</project>
