<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.pats</groupId>
        <artifactId>pats-parent</artifactId>
        <version>3.1.3</version>
    </parent>

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

    <name>Personal Access Tokens plugin</name>
    <description>Personal Access Tokens plugin</description>

    <properties>
        <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
        <!-- If this key changes, please edit the PluginFrontendEntryPointConstants and the webpack.config.js, or the UI will fail -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <!-- These properties allow us to override the test version without affecting the version used when compiling -->
        <jira.test.version>${jira.version}</jira.test.version>
        <jira.service.management.test.version>${jira.service.management.version}</jira.service.management.test.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.pats</groupId>
            <artifactId>pats-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.data.activeobjects</groupId>
            <artifactId>spring-data-activeobjects-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.annotations</groupId>
                    <artifactId>atlassian-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet.jsp</groupId>
            <artifactId>jakarta.servlet.jsp-api</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-application</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.annotations</groupId>
                    <artifactId>atlassian-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.pocketknife</groupId>
                    <artifactId>atlassian-pocketknife-querydsl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.bonnie</groupId>
                    <artifactId>atlassian-bonnie</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-oauth2</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.audit</groupId>
            <artifactId>atlassian-audit-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-random</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-password-encoder</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-rest-v2-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.code.findbugs</groupId>
                    <artifactId>jsr305</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-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.scheduler</groupId>
            <artifactId>atlassian-scheduler-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.botocss</groupId>
            <artifactId>botocss-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-memory</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies -->
        <!-- Junit 5 Jupiter -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- allows running JUnit 4 tests -->
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.data.activeobjects</groupId>
            <artifactId>spring-data-activeobjects-testutils</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-reload4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.test-framework</groupId>
            <artifactId>jersey-test-framework-core</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.test-framework.providers</groupId>
            <artifactId>jersey-test-framework-provider-jetty</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin.testutils</groupId>
            <artifactId>plugin-testutils-rest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-test-utils</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bonnie</groupId>
            <artifactId>atlassian-bonnie</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcmail-jdk15</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk15</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.ibm.icu</groupId>
                    <artifactId>icu4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.testutils</groupId>
            <artifactId>atlassian-test-annotations</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-plugin</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>1.19.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <platformVersion>${platform.version}</platformVersion>
                    <server>localhost</server>
                    <containerId>tomcat10x</containerId>

                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>react</artifactId>
                            <version>1.0.1-18.3.1</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.pats</groupId>
                            <artifactId>pats-test-plugin</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>

                    <systemPropertyVariables>
                        <es.insecure.allow.root>true</es.insecure.allow.root>
                        <atlassian.mail.senddisabled>false</atlassian.mail.senddisabled>
                        <!-- ExpiryPruningJob set to run every min on dev -->
                        <atlassian.pats.pruning.schedule.cron>0 * * * * ?</atlassian.pats.pruning.schedule.cron>
                        <atlassian.pats.max.tokens.expiry.days>150</atlassian.pats.max.tokens.expiry.days>
                        <!-- Allow session id to be used in Jira webdriver tests -->
                        <com.atlassian.plugins.authentication.basic.auth.filter.invalidate.session>false</com.atlassian.plugins.authentication.basic.auth.filter.invalidate.session>
                        <com.atlassian.plugins.authentication.basic.auth.filter.force.allow>true</com.atlassian.plugins.authentication.basic.auth.filter.force.allow>
                    </systemPropertyVariables>

                    <output>${project.build.directory}/output.log</output>

                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <!-- Do not remove: required for front end to function -->
                        <Atlassian-Scan-Folders>META-INF/plugin-descriptors</Atlassian-Scan-Folders>
                        <DynamicImport-Package>
                            com.atlassian.servicedesk.api.customer
                        </DynamicImport-Package>
                        <Import-Package>
                            com.atlassian.pats.api.*,
                            com.atlassian.confluence.api.service.accessmode;resolution:="optional",
                            com.atlassian.jira.plugin.webfragment.conditions;resolution:="optional",
                            org.springframework.osgi.*;resolution:="optional",
                            org.jmolecules.spring.*;resolution:="optional",
                            org.eclipse.gemini.blueprint.*;resolution:="optional",
                            com.atlassian.analytics.api.*;resolution:="optional",
                            com.atlassian.plugins.osgi.javaconfig.*;resolution:="optional",
                            org.slf4j.*;resolution:="optional",

                            com.atlassian.data.activeobjects.*,
                            com.atlassian.data.activeobjects.repository.*,
                            com.atlassian.activeobjects.util.*;resolution:="optional",
                            com.querydsl.core*;resolution:="optional",
                            org.springframework.lang.*;resolution:="optional",
                            org.springframework.transaction*;resolution:="optional",
                            org.springframework.dao*;resolution:="optional",
                            <!-- Required to run other products besides Jira as we pull in the jira-api but don't always require it -->
                            com.atlassian.jira*;resolution:="optional",
                            <!-- Required to run other products besides Confluence as we pull in the confluence dependency but don't always require it -->
                            com.atlassian.confluence*;resolution:="optional",
                            com.atlassian.user*;resolution:="optional",
                            com.atlassian.crowd.event.user*;resolution:="optional",
                            com.atlassian.audit*;resolution:="optional",
                            com.fasterxml.jackson*,

                            !org.joda.convert*;resolution:="optional",

                            com.atlassian.servicedesk.api.customer*;resolution:="optional",
                            com.atlassian.servicedesk.internal.api.customer.helpcenter.HelpCenterBrandingManager;resolution:="optional",

                            <!-- Unneeded Spring Data imports -->
                            !com.jayway.jsonpath.*;resolution:="optional",
                            !io.reactivex.*;resolution:="optional",
                            !io.vavr.*;resolution:="optional",
                            !io.smallrye.*;resolution:="optional",
                            !javax.enterprise*;resolution:="optional",
                            !jakarta.enterprise*;resolution:="optional",
                            !org.springframework.hateoas*;resolution:="optional",
                            !org.springframework.oxm*;resolution:="optional",
                            !org.springframework.web*;resolution:="optional",
                            !org.threeten.bp*;resolution:="optional",
                            !org.xmlbeam*;resolution:="optional",
                            !reactor.core.publisher*;resolution:="optional",
                            !rx*;resolution:="optional",
                            !javaslang*;resolution:="optional",
                            !kotlin*;resolution:="optional",
                            !scala*;resolution:="optional",
                            !groovy*;resolution:="optional",
                            !net.minidev.json*;resolution:="optional",
                            !org.reactivestreams*;resolution:="optional",
                            !com.atlassian.bonnie*;resolution:="optional",
                            !com.atlassian.spring*;resolution:="optional",
                            !org.eclipse.collections.*;resolution:="optional",

                            <!-- Unneeded Pocketknife imports -->
                            !net.sf.cglib.proxy,
                            !org.jvnet.hudson.annotation_indexer,
                            !com.google.gson.stream,
                            !com.ibm.uvm.tools,
                            !com.sun.jdmk.comm,
                            !javax.jmdns,
                            !javax.jms,
                            !javax.inject,
                            !javax.xml.bind*,
                            !net.sf.ehcache,
                            !net.spy.memcached,
                            !org.apache.avalon.framework*,
                            !org.apache.log,
                            !sun.security.util,
                            !com.mysema.query.*,
                            !com.mysema.query.spatial.path,
                            !com.mysema.query.spatial,
                            !org.postgis,
                            !oracle.spatial.geometry,
                            !org.geolatte.geom,
                            !org.geolatte.geom.codec,
                            !org.geolatte.geom.crs,
                            !bsh,
                            !lombok,

                            com.atlassian.annotations.tenancy*;resolution:="optional",
                            javax.annotation,
                            *
                        </Import-Package>

                        <!-- Ensure plugin is spring powered -->
                        <Spring-Context>*</Spring-Context>
                    </instructions>

                    <products>
                        <product>
                            <id>jira</id>
                            <instanceId>jira-latest</instanceId>
                            <version>${jira.test.version}</version>

                        </product>

                        <product>
                            <id>jira</id>
                            <instanceId>jira</instanceId>
                        </product>

                        <product>
                            <id>jira</id>
                            <instanceId>jira-with-jsm</instanceId>
                            <version>${jira.test.version}</version>

                            <applications>
                                <application>
                                    <applicationKey>jira-servicedesk</applicationKey>
                                    <version>${jira.service.management.test.version}</version>
                                </application>
                            </applications>
                        </product>

                        <product>
                            <id>jira</id>
                            <instanceId>jira-postgres</instanceId>
                            <dataSources>
                                <dataSource>
                                    <url>jdbc:postgresql://localhost:5432/jiradb</url>
                                    <schema>public</schema>
                                    <username>postgres</username>
                                    <password>postgres</password>
                                    <driver>org.postgresql.Driver</driver>
                                    <libArtifacts>
                                        <libArtifact>
                                            <groupId>org.postgresql</groupId>
                                            <artifactId>postgresql</artifactId>
                                            <version>42.2.6</version>
                                        </libArtifact>
                                    </libArtifacts>
                                </dataSource>
                            </dataSources>
                            <version>${jira.test.version}</version>
                            <jvmArgs>-XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
                                -Xms8g -Xmx16G -Dcom.sun.management.jmxremote
                            </jvmArgs>
                        </product>

                        <product>
                            <id>confluence</id>
                            <instanceId>confluence-latest</instanceId>
                            <version>${confluence.version}</version>
                            <jvmArgs>${confluence.jvm.args}</jvmArgs>
                        </product>

                        <product>
                            <id>confluence</id>
                            <instanceId>confluence</instanceId>
                            <version>${confluence.version}</version>
                            <jvmArgs>${confluence.jvm.args}</jvmArgs>
                        </product>

                        <product>
                            <id>refapp</id>
                            <version>${platform.version}</version>
                        </product>
                    </products>

                    <testGroups>
                        <testGroup>
                            <id>refapp-testgroup</id>
                            <productIds>
                                <productId>refapp</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>jira-with-jsm-testgroup</id>
                            <productIds>
                                <productId>jira-with-jsm</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>confluence-testgroup-latest</id>
                            <productIds>
                                <productId>confluence-latest</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>confluence-testgroup</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                        </testGroup>
                    </testGroups>

                    <includedFeModuleManifests>
                        <!-- Required to know what is development only & useful for other future projects -->
                        <includedFeModuleManifest>${project.basedir}/package.json</includedFeModuleManifest>
                        <!-- Required so all versions of all transitive dependencies are declared -->
                        <includedFeModuleManifest>${project.basedir}/yarn.lock</includedFeModuleManifest>
                    </includedFeModuleManifests>

                    <feManifestAssociations>
                        <feManifestAssociation>
                            <!-- package name of the frontend package -->
                            <packageName>atlassian-personal-access-tokens-plugin</packageName>
                            <manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                                <outputDirectoryFiles>
                                    frontend/bundled.com.atlassian.pats.admin-pats-plugin.js,
                                    frontend/bundled.com.atlassian.pats.pats-plugin.js,
                                    frontend/bundled.compiled-css.js,
                                    frontend/bundled.vendors~@atlaskit-internal_dynamic-table.js,
                                </outputDirectoryFiles>
                            </manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                        </feManifestAssociation>
                    </feManifestAssociations>
                </configuration>

                <executions>
                    <execution>
                        <id>js-enforcement</id>
                        <goals>
                            <goal>verify-fe-manifest-associations</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <verifyFeManifestAssociationsInputEntrypoint>
                                ${project.build.directory}/${project.build.finalName}.jar
                            </verifyFeManifestAssociationsInputEntrypoint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${eirslett.frontend.version}</version>
                <configuration>
                    <yarnVersion>${yarnVersion}</yarnVersion>
                    <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                    <workingDirectory>${frontend.working.directory}</workingDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install-node-and-yarn</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>install-prod-dependencies</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>${yarn.cmd.install}</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile-the-ui</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>${yarn.cmd.build}</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn type-check</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>run type-check</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn lint</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>run lint</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>run-tests</id>
                        <phase>test</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>test</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <excludePackageNames>com.atlassian.pats.rest</excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>watch-mode</id>
            <properties>
                <yarn.cmd.build>${yarn.cmd.build.watch}</yarn.cmd.build>
            </properties>
        </profile>
        <profile>
            <id>jira-tests-latest</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>jira-with-jsm-testgroup</testGroups>
            </properties>
        </profile>
        <profile>
            <id>jira-tests</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>jira-with-jsm-testgroup</testGroups>
            </properties>
        </profile>
        <profile>
            <id>confluence-tests-latest</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>confluence-testgroup-latest</testGroups>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <configuration>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>

                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>3.2.3</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functest-rest-plugin</artifactId>
                                    <version>${confluence.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>confluence-tests</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>confluence-testgroup</testGroups>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <configuration>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>

                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>3.2.3</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functest-rest-plugin</artifactId>
                                    <version>${confluence.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>refapp-tests-latest</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>refapp-testgroup</testGroups>
            </properties>
        </profile>
    </profiles>
</project>
