<?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.pats</groupId>
        <artifactId>pats-parent</artifactId>
        <version>1.1.1</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>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
            <version>${osgi.javaconfig.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.pats</groupId>
            <artifactId>pats-core</artifactId>
            <version>${project.version}</version>
        </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>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-api</artifactId>
            <version>${jira.service.desk.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk</artifactId>
            <version>${jira.service.desk.version}</version>
            <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>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence.compat</groupId>
            <artifactId>confluence-compat-lib</artifactId>
            <version>1.3.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.bonnie</groupId>
                    <artifactId>atlassian-bonnie</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</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>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.audit</groupId>
            <artifactId>atlassian-audit-api</artifactId>
            <version>${atlassian.audit.api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.data.activeobjects</groupId>
            <artifactId>spring-data-activeobjects-core</artifactId>
            <version>${spring-data-activeobjects.version}</version>
            <scope>compile</scope>
            <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>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-random</artifactId>
            <version>${atl.security.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-password-encoder</artifactId>
            <version>${atl.security.encoder.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <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>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>${jaxb.version}</version>
            <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>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <version>${activeobjects.version}</version>
            <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>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>${bouncycastle.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.scheduler</groupId>
            <artifactId>atlassian-scheduler-api</artifactId>
            <version>${atlassian.scheduler.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
            <version>${atlassian.analytics.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.botocss</groupId>
            <artifactId>botocss-core</artifactId>
            <version>${botocss.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-memory</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</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>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.data.activeobjects</groupId>
            <artifactId>spring-data-activeobjects-testutils</artifactId>
            <version>${spring-data-activeobjects.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <version>${atlassian.webdriver.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>${restassured.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey.jersey-test-framework</groupId>
            <artifactId>jersey-test-framework-grizzly2</artifactId>
            <version>${jersey.test.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>${h2.db.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${awaitility.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin.testutils</groupId>
            <artifactId>plugin-testutils-rest</artifactId>
            <version>${plugin.testutils.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-rest-client</artifactId>
            <version>${confluence.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-test-utils</artifactId>
            <version>${confluence-test-utils.version}</version>
            <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>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <enableQuickReload>true</enableQuickReload>
                    <log4jProperties>src/main/resources/log4-pats-plugin.properties</log4jProperties>
                    <server>localhost</server>

                    <pluginArtifacts>
                        <!-- for org.springframework.dao -->
                        <pluginArtifact>
                            <groupId>org.apache.servicemix.bundles</groupId>
                            <artifactId>org.apache.servicemix.bundles.spring-tx</artifactId>
                            <version>${spring.version}_1</version>
                        </pluginArtifact>

                        <pluginArtifact>
                            <groupId>com.atlassian.pats</groupId>
                            <artifactId>pats-test-plugin</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>

                        <!-- Confluence 7.6 is on different platform version than Jira/Refapp. Which means spring version 
                        5.1 is used instead of 5.0 -->
                        <pluginArtifact>
                            <groupId>org.apache.servicemix.bundles</groupId>
                            <artifactId>org.apache.servicemix.bundles.spring-tx</artifactId>
                            <version>5.1.14.RELEASE_1</version>
                        </pluginArtifact>
                        
                        <pluginArtifact>
                            <groupId>com.atlassian.labs</groupId>
                            <artifactId>rest-api-browser</artifactId>
                            <version>3.2.3</version>
                         </pluginArtifact>
                    </pluginArtifacts>

                    <systemPropertyVariables>
                        <trimStackTrace>false</trimStackTrace>
                        <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>
                    </systemPropertyVariables>

                    <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>

                        <Import-Package>
                            com.atlassian.pats.api.*,
                            com.atlassian.confluence.api.service.accessmode;resolution:="optional",
                            org.springframework.osgi.*;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.atlassian.servicedesk.api.customer*;resolution:="optional",
                            com.atlassian.servicedesk.internal.api.customer.helpcenter.HelpCenterBrandingManager;resolution:="optional",

                            <!-- Unneeded Spring Data imports -->
                            !com.fasterxml.jackson*;resolution:="optional",
                            !com.jayway.jsonpath.*;resolution:="optional",
                            !io.reactivex.*;resolution:="optional",
                            !io.vavr.*;resolution:="optional",
                            !javax.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",

                            <!-- 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,
                            !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,

                            javax.annotation,
                            *
                        </Import-Package>

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

                    <products>
                        <product>
                            <id>jira</id>
                            <instanceId>jira-latest</instanceId>
                        </product>

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

                        <product>
                            <id>jira</id>
                            <instanceId>jira-with-jsd</instanceId>
                            <version>${jira.version.amps}</version>

                            <applications>
                                <application>
                                    <applicationKey>jira-servicedesk</applicationKey>
                                    <version>${jira.servicedesk.version.amps}</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>
                            <jvmArgs>-XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
                                -Xms8g -Xmx16G -Dcom.sun.management.jmxremote
                            </jvmArgs>
                        </product>

                        <product>
                            <id>confluence</id>
                            <instanceId>confluence-latest</instanceId>
                            <jvmArgs>-Xms1g -Xmx2g</jvmArgs>
                        </product>

                        <product>
                            <id>confluence</id>
                            <instanceId>confluence</instanceId>
                            <version>${confluence.version.amps}</version>
                            <jvmArgs>-Xms1g -Xmx2g</jvmArgs>
                        </product>

                        <product>
                            <id>refapp</id>
                        </product>
                    </products>

                    <testGroups>
                        <testGroup>
                            <id>refapp-testgroup</id>
                            <productIds>
                                <productId>refapp</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>jira-testgroup-latest</id>
                            <productIds>
                                <productId>jira-latest</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>jira-with-jsd-testgroup</id>
                            <productIds>
                                <productId>jira-with-jsd</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>

                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${eirslett.frontend.version}</version>
                <configuration>
                    <nodeVersion>${nodeVersion}</nodeVersion>
                    <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>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>
        </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-testgroup-latest</testGroups>
            </properties>
        </profile>
        <profile>
            <id>jira-tests</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>jira-with-jsd-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>
                                <!-- for org.springframework.dao -->
                                <pluginArtifact>
                                    <groupId>org.apache.servicemix.bundles</groupId>
                                    <artifactId>org.apache.servicemix.bundles.spring-tx</artifactId>
                                    <version>${spring.version}_1</version>
                                </pluginArtifact>

                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>

                                <!-- Confluence 7.6 is on different platform version than Jira/Refapp. Which means spring version
                                5.1 is used instead of 5.0 -->
                                <pluginArtifact>
                                    <groupId>org.apache.servicemix.bundles</groupId>
                                    <artifactId>org.apache.servicemix.bundles.spring-tx</artifactId>
                                    <version>5.1.14.RELEASE_1</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>
                                <!-- for org.springframework.dao -->
                                <pluginArtifact>
                                    <groupId>org.apache.servicemix.bundles</groupId>
                                    <artifactId>org.apache.servicemix.bundles.spring-tx</artifactId>
                                    <version>${spring.version}_1</version>
                                </pluginArtifact>

                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>

                                <!-- Confluence 7.6 is on different platform version than Jira/Refapp. Which means spring version
                                5.1 is used instead of 5.0 -->
                                <pluginArtifact>
                                    <groupId>org.apache.servicemix.bundles</groupId>
                                    <artifactId>org.apache.servicemix.bundles.spring-tx</artifactId>
                                    <version>5.1.14.RELEASE_1</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>
