<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.upm</groupId>
        <artifactId>atlassian-universal-plugin-manager</artifactId>
        <version>1001.0.84</version>
    </parent>
    <artifactId>atlassian-universal-plugin-manager-integration-tests</artifactId>
    <packaging>atlassian-plugin</packaging>
    <name>Atlassian Universal Plugin Manager Integration/UI Tests</name>
    <description>Integration tests, UI tests, mock PAC, and AMPS product configurations.</description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <type>atlassian-plugin</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>org.json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>atlassian-confluence-pageobjects</artifactId>
            <version>${confluence.pageobjects.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-pageobjects</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>fake-mac-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <type>atlassian-plugin</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>fake-pac-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <type>atlassian-plugin</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-installable</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-bundled-has-no-update</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-installable</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-nonbundled</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>testing</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-jaxrs</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version> <!-- overriding from parent pom because atlassian-selenium requires this version -->
        </dependency>
        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-apache-client</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
          <groupId>com.atlassian.application</groupId>
          <artifactId>atlassian-application-api</artifactId>
          <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bundles</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>cloud.atlassian.logmon</groupId>
            <artifactId>laas-logging-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.7</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.7</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.7</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.integrationtesting</groupId>
            <artifactId>atlassian-integrationtesting-lib</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>net.sourceforge.htmlunit</groupId>
                    <artifactId>htmlunit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>be.roam.hue</groupId>
                    <artifactId>hue</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>rome</groupId>
            <artifactId>rome</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>com.springsource.org.jdom</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-multipart</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.bundlerepository</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-random</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>4.1.0</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.qunit</groupId>
            <artifactId>atlassian-qunit-plugin-util</artifactId>
            <version>${atlassian.qunit.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-test-categories</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.utt</groupId>
            <artifactId>toolkit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>2.3.3</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.whisper</groupId>
            <artifactId>atlassian-whisper-testkit</artifactId>
            <version>${whisper.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <configuration>
                    <httpPort>${httpPort}</httpPort>
                    <contextPath>${contextPath}</contextPath>
                    <installPlugin>false</installPlugin>
                    <systemPropertyVariables>
                        <upm.test.update.version>${upm.test.update.version}</upm.test.update.version>
                        <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
                        <atlassian.id.baseurl>${atlassian.id.baseurl}</atlassian.id.baseurl>
                        <devtoolbar.enable>true</devtoolbar.enable>
                        <hamlet.baseurl>${hamlet.baseurl}</hamlet.baseurl>
                        <mac.baseurl>${mac.baseurl}</mac.baseurl>
                        <mpac.baseurl>${mpac.baseurl}</mpac.baseurl>
                        <mpac.website>${mpac.website}</mpac.website>
                        <shopping.cart.url>${shopping.cart.url}</shopping.cart.url>
                        <mac.billing.url>${mac.billing.url}</mac.billing.url>
                        <httpPort>${httpPort}</httpPort>
                        <contextPath>${contextPath}</contextPath>
                        <upm.pac.disable>${upm.pac.disable}</upm.pac.disable>
                        <analytics.server>${analytics.server}</analytics.server>
                        <atlassian.dev.confluence.whatsnew.show>false</atlassian.dev.confluence.whatsnew.show>
                        <atlassian.dev.jira.whatsnew.show>false</atlassian.dev.jira.whatsnew.show>
                        <atlassian.upm.server.data.disable>${atlassian.upm.server.data.disable}</atlassian.upm.server.data.disable>
                        <atlassian.webresource.disable.minification>${atlassian.webresource.disable.minification}</atlassian.webresource.disable.minification>
                        <atlassian.upm.debug>${atlassian.upm.debug}</atlassian.upm.debug>
                        <atlassian.upm.on.demand.plugin.installation.allowed>${atlassian.upm.on.demand.plugin.installation.allowed}</atlassian.upm.on.demand.plugin.installation.allowed>
                        <atlassian.upm.on.demand.update.check.interval>${atlassian.upm.on.demand.update.check.interval}</atlassian.upm.on.demand.update.check.interval>
                        <atlassian.upm.on.demand>${atlassian.upm.on.demand}</atlassian.upm.on.demand>
                        <atlassian.upm.user.installed.override>${atlassian.upm.user.installed.override}</atlassian.upm.user.installed.override>
                        <atlassian.upm.user.installed.p2.override>${atlassian.upm.user.installed.p2.override}</atlassian.upm.user.installed.p2.override>
                        <atlassian.upm.required.plugins.override>${atlassian.upm.required.plugins.override}</atlassian.upm.required.plugins.override>
                        <atlassian.upm.required.modules.override>${atlassian.upm.required.modules.override}</atlassian.upm.required.modules.override>
                        <atlassian.upm.installer.plugin.scan.directory>${atlassian.upm.installer.plugin.scan.directory}</atlassian.upm.installer.plugin.scan.directory>
                        <atlassian.upm.check.license.feature>${atlassian.upm.check.license.feature}</atlassian.upm.check.license.feature>
                        <atlassian.upm.purchased.addons.feature>${atlassian.upm.purchased.addons.feature}</atlassian.upm.purchased.addons.feature>
                        <plugin.resource.directories>${upm.plugin.resources}</plugin.resource.directories>
                        <fastdev.no.reload.extensions>js,vm,css,gif,png,swp</fastdev.no.reload.extensions>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <xvfb.options>-listen,tcp,-once,-screen,0,1920x1080x24</xvfb.options>
                        <webdriver.browser>${webdriver.browser}</webdriver.browser>
                        <upm.version>${project.version}</upm.version>
                        <qunit.testoutput.location>${project.build.directory}/surefire-reports</qunit.testoutput.location>
                        <johnson.spring.lifecycle.synchronousStartup>true</johnson.spring.lifecycle.synchronousStartup> <!-- UPM-4663 - Needed for Stash 3.2+ so Cargo will wait for stash to startup -->
                        <com.atlassian.jira.startup.LauncherContextListener.SYNCHRONOUS>true</com.atlassian.jira.startup.LauncherContextListener.SYNCHRONOUS> <!-- Disable async startup for JIRA 7.1+ -->
                        <atlassian.darkfeature.jquery.external>false</atlassian.darkfeature.jquery.external>
                        <manas.mode>false</manas.mode>
                    </systemPropertyVariables>
                    <pluginArtifacts>
                        <!-- Test artifacts -->
                        <pluginArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-updatable-requires-restart-1.0</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-license-checker</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                        <!-- This plugin is required because a test needs it, but it can't be installed by the test because it is v1 -->
                        <pluginArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-installable</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <bundledArtifacts>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>wired-tests-helper-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>fake-mac-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>fake-pac-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-not-reloadable</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-bundled-confluence-scriptsready-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-bundled</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-bundled-updatable</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-system</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-bundled-with-config</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <!-- Plugin for a test to install, and the plugin doesn't have an update -->
                        <bundledArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-bundled-has-no-update</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-javascript-tests</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.qunit</groupId>
                            <artifactId>atlassian-qunit-plugin</artifactId>
                            <version>${atlassian.qunit.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-flagged-as-system-required</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <!-- changed to using QuickReload instead of FastDev (maybe until AMPS-1151 is fixed) -->
                        <!-- see atlassian-universal-plugin-manager-integration-tests/.quickreload for list of quick reload directories to check -->
                        <bundledArtifact>
                            <groupId>com.atlassian.labs.plugins</groupId>
                            <artifactId>quickreload</artifactId>
                            <version>${quickreload.version}</version>
                        </bundledArtifact>
                    </bundledArtifacts>
                    <products>
                        <!-- JIRA PRODUCT -->
                        <product>
                            <!-- the latest compatible/tested product version, which is the only one we test in Cloud. see the parent pom.xml to update this product version. -->
                            <id>jira</id>
                            <version>${jira.version}</version>
                            <output>${project.build.directory}/jira-${jira.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableFastdev}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                            <server>localhost</server> <!-- UPM-4843 - JIRA 7 data isn't configured with real hostname -->
                            <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira-software.version}</version>
                                </application>
                            </applications>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-classpath</artifactId>
                                    <version>${project.version}</version>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>${jdbc.postgres.version}</version>
                                </libArtifact>
                            </libArtifacts>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>role-based-licensing-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
	                            
                                <!-- unfortunately, we have to copy ALL the pluginArtifacts from the base config since they are not additive -->
        
                                <pluginArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-updatable-requires-restart-1.0</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-license-checker</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <!-- This plugin is required because a test needs it, but it can't be installed by the test because it is v1 -->
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-installable</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>

                                <pluginArtifact>
                                    <groupId>com.atlassian.whisper</groupId>
                                    <artifactId>atlassian-whisper-plugin</artifactId>
                                    <version>${whisper.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.whisper</groupId>
                                    <artifactId>atlassian-whisper-backdoor-plugin</artifactId>
                                    <version>${whisper.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>

                        <!-- CONFLUENCE PRODUCT VERSIONS -->
                        <product>
                            <!-- the latest compatible/tested product version, which is the only one we test in Cloud. see the parent pom.xml to update this product version. -->
                            <id>confluence</id>
                            <version>${confluence.version}</version>
                            <dataSources>
                                <dataSource>
                                    <jndi>jdbc/TenantedDS</jndi>
                                    <url>jdbc:postgresql://${docker.host.address}:${database.port}/confluence</url>
                                    <username>postgres</username>
                                    <password>postgres</password>
                                    <driver>org.postgresql.Driver</driver>
                                    <libArtifacts>
                                        <libArtifact>
                                            <groupId>org.postgresql</groupId>
                                            <artifactId>postgresql</artifactId>
                                            <version>${jdbc.postgres.version}</version>
                                        </libArtifact>
                                    </libArtifacts>
                                </dataSource>
                            </dataSources>
                            <output>${project.build.directory}/confluence-${confluence.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableFastdev}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-classpath</artifactId>
                                    <version>${project.version}</version>
                                </libArtifact>
                                <!-- confluence has libArtifacts show up as User Installed and pluginArtifacts as System -->
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-test-plugin-v1-installable</artifactId>
                                    <version>${project.version}</version>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>${jdbc.postgres.version}</version>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>jira</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- These files are used to test uploading jars from the local filesystem. -->
                        <id>copy-plugins-to-local-dir</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.testOutputDirectory}/test-jars</outputDirectory>
                            <includeArtifactIds>atlassian-universal-plugin-manager-plugin,atlassian-universal-plugin-manager-test-plugin-v2-installable,atlassian-universal-plugin-manager-test-plugin-v1-nonbundled</includeArtifactIds>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>postgres-jira</id>
            <build>
                <plugins>
                    <!--If you include this plugin it will start postgres jira database docker container in compile phase-->
                    <!--jira database is configured to contain database 'jira' user 'jira' with password 'jira'-->
                    <!--jira database is prepopulated with the user admin/admin and test licence-->
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <version>0.14.2</version>
                        <extensions>true</extensions>
                        <configuration>
                            <dockerHost>${docker.host}</dockerHost><!-- work around for https://github.com/fabric8io/docker-maven-plugin/issues/344 -->
                            <images>
                                <image>
                                    <name>${jira.postgres.docker.image}</name>
                                    <run>
                                        <ports>
                                            <!-- Port mappings: Container internal port 5432 will be
                                            dynamically mapped and this (random) port will be assigned to the maven variable
                                            ${database.port}. -->
                                            <port>database.port:5432</port>
                                        </ports>
                                        <wait>
                                            <!-- Docker container requires some time to start, if we connect too early we will fail
                                            This timeout is set to 30 seconds because Docker images can be slow to start in Bamboo. -->
                                            <time>30000</time>
                                            <log>database system is ready to accept connections</log>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                        <!-- Connect this plugin to the maven lifecycle around the integration-test phase. I.e. start the container
                        in compile and stop it in post-integration-test. -->
                        <executions>
                            <execution>
                                <id>start</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                        <version>1.5</version>

                        <configuration>
                            <driver>org.postgresql.Driver</driver>
                            <url>jdbc:postgresql://${docker.host.address}:${database.port}/jira</url>
                            <username>jira</username>
                            <password>jira</password>
                            <autocommit>true</autocommit>
                        </configuration>

                        <executions>
                            <execution>
                                <id>initialize-data</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <srcFiles>
                                        <!-- populate required users and set jira.baseurl to correct baseurl -->
                                        <srcFile>${basedir}/src/test/resources/jira/init-data.sql</srcFile>
                                    </srcFiles>
                                    <sqlCommand>
                                        -- Update baseurl
                                        UPDATE propertystring set propertyvalue='http://localhost:${httpPort}${contextPath}' WHERE id=10011;
                                    </sqlCommand>
                                </configuration>
                            </execution>
                        </executions>

                        <dependencies>
                            <dependency>
                                <groupId>org.postgresql</groupId>
                                <artifactId>postgresql</artifactId>
                                <version>${jdbc.postgres.version}</version>
                                <scope>compile</scope>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-amps-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <PG_DB_ROLE>jira</PG_DB_ROLE>
                                <PG_DB_HOST>${docker.host.address}</PG_DB_HOST>
                                <PG_DB_NAME>jira</PG_DB_NAME>
                                <PG_DB_PASSWORD>jira</PG_DB_PASSWORD>
                                <PG_DB_PORT>${database.port}</PG_DB_PORT>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>postgres-conf</id>
            <build>
                <plugins>
                    <!--If you include this plugin it will start ondemand-postgres database docker container in compile phase-->
                    <!--ondemand-postgres  database is configured to contain database 'confluence' user 'confluence' with password 'confluence'-->
                    <!--ondemand-postgres  database is prepopulated with the user admin/admin and test licence-->
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <version>0.14.2</version>
                        <extensions>true</extensions>
                        <configuration>
                            <dockerHost>${docker.host}</dockerHost><!-- work around for https://github.com/fabric8io/docker-maven-plugin/issues/344 -->
                            <images>
                                <image>
                                    <name>${confluence.postgres.docker.image}</name>
                                    <run>
                                        <ports>
                                            <!-- Port mappings: Container internal port 5432 will be
                                            dynamically mapped and this (random) port will be assigned to the maven variable
                                            ${database.port}. -->
                                            <port>database.port:5432</port>
                                        </ports>
                                        <wait>
                                            <!-- Docker container requires some time to start, if we connect too early we will fail
                                            This timeout is set to 30 seconds because Docker images can be slow to start in Bamboo. -->
                                            <time>30000</time>
                                            <log>database system is ready to accept connections</log>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                        <!-- Connect this plugin to the maven lifecycle around the integration-test phase. I.e. start the container
                        in compile and stop it in post-integration-test. -->
                        <executions>
                            <execution>
                                <id>start</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-amps-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <database.url>jdbc:postgresql://${docker.host.address}:${database.port}/confluence</database.url>
                                <database.name>postgres</database.name>
                                <database.password>postgres</database.password>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ui</id>
            <properties>
                <!-- run ui tests without integration tests -->
                <testIncludes>it/**/uitests/**/*Test.java</testIncludes>
            </properties>
        </profile>
        <profile>
            <id>allTests</id>
            <properties>
                <!-- run both integration tests and ui tests -->
                <testIncludes>it/**/*Test.java</testIncludes>
            </properties>
        </profile>
        <profile>
            <id>allTestGroups</id>
            <properties>
                <testGroups>${jiraTestGroups},${confluenceTestGroups}</testGroups>
            </properties>
        </profile>
        <profile>
            <id>ide</id>
            <!-- UPM-1268 : Duplicate dependency declarations are here to make idea / eclipse happy; otherwise they
              don't handle dependencies of type atlassian-plugin well. If you get compilation problems in your
               ide, try activating this profile. These also need to be kept up to date if additional atlassian-plugin type
                dependencies are added to the default profile. I've set scope to test, because the ide's don't
                 seem to particularly care. -->
            <dependencies>
                <dependency>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>fake-mac-plugin</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>fake-pac-plugin</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <properties>
        <testGroups>jira,confluence</testGroups>
        <jiraTestGroups>jira</jiraTestGroups>
        <confluenceTestGroups>confluence</confluenceTestGroups>

        <project.root.dir>${basedir}/..</project.root.dir>
        <upm.plugin.resources>${project.root.dir}/licensing-parent/role-based-licensing-plugin/src/main/resources,${project.root.dir}/atlassian-universal-plugin-manager-plugin/src/main/resources,${project.root.dir}/atlassian-universal-plugin-manager-test-resources/atlassian-universal-plugin-manager-javascript-tests/src/main/resources</upm.plugin.resources>
        <upm.plugin.name>atlassian-universal-plugin-manager-plugin</upm.plugin.name>
        <testIncludes>it/**/integrationtests/**/*Test.java</testIncludes> <!-- run integration tests without ui tests by default -->
        <testIncludesStoragePlugin>it/**/PluginLicenseStoragePlugin*IntegrationTest.java</testIncludesStoragePlugin>

        <whisper.version>1.0.27</whisper.version>

        <!-- OnDemand compatibility test directives -->
        <od.testing.configuration>
            use-maven,3.2
        </od.testing.configuration>
    </properties>
</project>
