<?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.refapp</groupId>
        <artifactId>atlassian-refapp-parent</artifactId>
        <version>6.2.0-560bd1f2</version>
    </parent>

    <artifactId>atlassian-refapp</artifactId>
    <packaging>war</packaging>

    <name>Atlassian Reference Application</name>

    <properties>
        <http.port>5990</http.port>
        <rmi.port>8580</rmi.port>
        <refapp.context>refapp</refapp.context>
        <baseurl>http://localhost:${http.port}/${refapp.context}</baseurl>
        <jvmargs>-Xms128m -Xmx1024m -XX:MaxPermSize=256m -Dupm.pac.disable=true -Datlassian.dev.mode=true -Djava.awt.headless=true</jvmargs>
        <debug.suspend />
        <jvmargs.debug.template>-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=${debug.suspend}</jvmargs.debug.template>
        <jvmargs.debug />
        <xvfb.enable>true</xvfb.enable>
        <springTestVersion>spring53x</springTestVersion>
        <skipAmps>false</skipAmps>
        <debug.timeout>240000</debug.timeout>
    </properties>

    <dependencies>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-reload4j</artifactId>
            <exclusions>
                <!-- We still want to use our fork of `log4j`, ensure official fork won't be included. -->
                <exclusion>
                    <groupId>ch.qos.reload4j</groupId>
                    <artifactId>reload4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- New version of `slf4j-log4j12` no longer depends on `log4j`.
         To ensure presence of `log4j` at runtime, it is added as explicit dependency -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.profiling</groupId>
            <artifactId>atlassian-profiling-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- This dependency is here to ensure parallel compilation builds bundled plugins before the webapp.
             Removing this dependency will break parallel builds. -->
        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-bundled-plugins</artifactId>
            <version>${project.version}</version>
            <type>txt</type>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.mail</groupId>
            <artifactId>atlassian-mail</artifactId>
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.extras</groupId>
            <artifactId>atlassian-extras</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-spi</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-utils</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-host</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-spi</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-servlet</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-random</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.http</groupId>
            <artifactId>atlassian-http</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.velocity.htmlsafe</groupId>
            <artifactId>velocity-htmlsafe</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security.auth.trustedapps</groupId>
            <artifactId>atlassian-trusted-apps-core</artifactId>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>sitemesh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- To be removed; some bundled plugins still require commons-lang -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <scope>runtime</scope>
            <!-- Overridden to runtime scope to include it in the webapp -->
        </dependency>

        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>oscore</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-client-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-provider-api</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <exclusions>
                <!-- duplicates `jcl-over-slf4j` in the classpath -->
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-jcl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-pageobjects</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.json</groupId>
            <artifactId>atlassian-json-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.html</groupId>
            <artifactId>atlassian-html-encoder</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.ip</groupId>
            <artifactId>atlassian-ip</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.functest</groupId>
            <artifactId>functest-plugin</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-jaxrs</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.healthcheck</groupId>
            <artifactId>atlassian-healthcheck-in-product-test-support</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <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>
                    <enableDevToolbox>true</enableDevToolbox>
                    <enableQuickReload>false</enableQuickReload>
                    <productVersion>${project.version}</productVersion>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>smartass-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-bundled-plugins</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-listed-artifacts</goal>
                        </goals>
                        <configuration>
                            <sourceList>${project.build.directory}/atlassian-refapp-bundled-plugins.txt</sourceList>
                            <targetDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/atlassian-bundled-plugins</targetDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-bundled-plugins-list</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>atlassian-refapp-bundled-plugins</includeArtifactIds>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>extract-framework-bundles</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-plugins-framework-bundles</artifactId>
                                    <version>${atlassian.plugins.version}</version>
                                    <type>zip</type>
                                    <classifier>${springTestVersion}</classifier>
                                    <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/framework-bundles</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sql-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <argLine>-Dbaseurl.refapp=${baseurl} -Dhttp.refapp.port=${http.port} -Dcontext.refapp.path=${refapp.context} -Dxvfb.enable=${xvfb.enable}</argLine>
                    <includes>
                        <include>it/**/*</include>
                        <!-- enable CTK tests before releasing final version of Platform 6 -->
                        <!--<include>ctk/**/*</include>-->
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/*</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>ban_conflicting_dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>make sure google-collection is not accidentally included as transitive dependency (use Guava instead)</message>
                                    <excludes>
                                        <exclude>com.google.collections:google-collections</exclude>
                                    </excludes>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>Exclude duplicate javax.inject dependencies, use plain javax.inject instead</message>
                                    <excludes>
                                        <exclude>org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax-inject</exclude>
                                    </excludes>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>make sure com.googlecode.findbugs:jsr305, net.sourceforge.findbugs:jsr305 and com.atlassian.bundles:jsr305 are not accidentally included as transitive dependencies. Use com.google.code.findbugs:jsr305 from platform third-party instead.
                                    </message>
                                    <excludes>
                                        <exclude>com.googlecode.findbugs:jsr305</exclude>
                                        <exclude>net.sourceforge.findbugs:jsr305</exclude>
                                        <exclude>com.atlassian.bundles:jsr305</exclude>
                                    </excludes>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>Exclude duplicate servlet-api dependencies, use javax.servlet:javax.servlet-api instead</message>
                                    <excludes>
                                        <exclude>javax.servlet:servlet-api</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- amps has does not have a way to skip execution of the run/stop goals
                instead this profile is used to selectively add the goals only when
                skipTests is not set. This will not respect -DskipITs, fail safe will
                respect it but amps won't
            -->
            <id>amps:run</id>
            <activation>
                <property>
                    <name>!skipTests</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <executions>
                        <!--
                         We are not using amps' 'integration-test' goal because that mojo forces the
                         project to be maven installed as a jar rather than a war which messes life up
                         for anyone trying to use the app. This way that doesn't happen and we still get
                         to use amps instead of using cargo directly so we can (hopefully) rely on the tested
                         behaviour being the same as the running behaviour.
                         The wait property stops the maven run command from waiting for input on stdin,
                         so the tests can run with the tomcat in the background. This means maven stop must be
                         called post testing as there will be no prompt where Ctl-D or Ctl-C will stop the container.
                         Also see the parent pom sql maven plugin comment if you are getting db errors.
                         -->
                        <execution>
                            <id>start-integration-test</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>
                                    run
                                </goal>
                            </goals>
                            <configuration>
                                <enableDevToolbox>false</enableDevToolbox>
                                <wait>false</wait>
                                <skipAllPrompts>true</skipAllPrompts>
                                <productVersion>${project.version}</productVersion>
                                <systemProperties>
                                    <platform.ctk.test.admin.username>admin</platform.ctk.test.admin.username>
                                    <platform.ctk.test.admin.password>admin</platform.ctk.test.admin.password>
                                    <platform.ctk.test.admin.fullname>A. D. Ministrator (Sysadmin)</platform.ctk.test.admin.fullname>
                                    <platform.ctk.test.validlicense>
                                        AAACVA0ODAoPeNqdVk1vozAQvfMrkPZMBE20h0pI2ya0i5qv3dBLb4ZMEq/ARLbJbv79gsHlywbRU
                                        xR/zJt5783gb8ElM18gNB3bdJzHuf04/256h8B8sB3HCFESpulsjSMgDLx/V0zvK8TB3c9/GgegN
                                        6D+yn1eLDaWvdjZ1sfh4816dfa/jIimf4+zJQXEcUrEnSKiZT9Yjp3vZhEOY5gtU8JRxLcoAdcnH
                                        M5UnDcDQInxB1MksYP7FcSpIE/O375WAPldfAOX0wzqoHtEOQEqjndLOOIivvu+XfsbP/BWxgmzC
                                        9xHMinBdvSMCGZi3X3iMWIMI1LjejcUZ+VuO6ENwnlEgkjU5VCit1IWdWvAxJ4+XpSSU5uUYkHHY
                                        cXNNktCoLvTs/i7TiMUP52BcOZaThlADyjy0crcAFfdWwGLKL6KEqtj5iml5j5GPP9NzGXwZnJgH
                                        JNzzaY6oMCaGLAQtStaxUlfS+HncZMMaCP2B8yp8XgF6uWRYxfXqNYRbuwHktaYRWlSsjBknaY3x
                                        IIU/50BLQUv08xodEEMupJWGesUL+0wIWHZACMWnSZsQcLo6NGwJBPS+GKIW7UxZcAm88rG+w1Jy
                                        qHReZ9DUltKodQw6mBr9rQXZeikb9WonaPD6Wjo6/BRe1EoOcX/krNeKJnByOwc8b3ye/OlBCc5W
                                        nbdBKDqiq6e7jTtNZ7k6wsjVT/OKkxFK4zIMv5OaM3VUkrFpO2fUg96xVSUjwsNoZ13xKThp+7Dw
                                        Zo/Hw4jc3oohnIK5bqSxndgkvwi7S6h/wEUMrYWMCwCFFBwk1DQL0qqxQbV15RZa/W8ESB7AhQ3b
                                        E9VSUvHT1S7vDj6p4zb0Oabdw==X02rr
                                    </platform.ctk.test.validlicense>
                                    <platform.ctk.test.search.term>refapp</platform.ctk.test.search.term>
                                    <platform.ctk.test.search.matches>http://foo.com,http://bar.com</platform.ctk.test.search.matches>
                                    <atlassian.darkfeature.foo>true</atlassian.darkfeature.foo>
                                    <atlassian.darkfeature.bar>false</atlassian.darkfeature.bar>
                                </systemProperties>
                                <pluginArtifacts>
                                    <pluginArtifact>
                                        <groupId>com.atlassian.functest</groupId>
                                        <artifactId>functest-plugin</artifactId>
                                        <version>${fp.libversion}</version>
                                    </pluginArtifact>
                                    <pluginArtifact>
                                        <groupId>com.atlassian.refapp</groupId>
                                        <artifactId>refapp-test-plugin</artifactId>
                                        <version>${project.version}</version>
                                    </pluginArtifact>
                                </pluginArtifacts>
                            </configuration>
                        </execution>
                        <execution>
                            <id>stop-integration-test</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>
                                    stop
                                </goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>debug</id>
            <properties>
                <debug.suspend>n</debug.suspend>
                <jvmargs.debug>${jvmargs.debug.template}</jvmargs.debug>
            </properties>
        </profile>
        <profile>
            <id>suspend</id>
            <properties>
                <debug.suspend>y</debug.suspend>
                <jvmargs.debug>${jvmargs.debug.template}</jvmargs.debug>
            </properties>
        </profile>
        <profile>
            <id>spring42x</id>
            <properties>
                <springTestVersion>spring42x</springTestVersion>
            </properties>
        </profile>
        <profile>
            <id>skipCargoWhenSkipTests</id>
            <activation>
                <property>
                    <name>skipTests</name>
                </property>
            </activation>
            <properties>
                <skipAmps>true</skipAmps>
            </properties>
        </profile>
        <profile>
            <id>skipCargoWhenMavenSkipTest</id>
            <activation>
                <property>
                    <name>maven.test.skip</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <skipAmps>true</skipAmps>
            </properties>
        </profile>

        <profile>
            <!-- For using an external Postgres database provided by you (or a Maven plugin, etc.) -->
            <id>external-postgres</id>
            <properties>
                <!-- Reasonable defaults; override them if your external Postgres instance is set up differently -->
                <postgres.host>localhost</postgres.host>
                <postgres.port>5432</postgres.port>
                <!-- The details that Refapp will use to log into the db and (if necessary) create the schema -->
                <!-- You must have set these up using a DBA account, before starting Refapp  -->
                <postgres.refapp.db>refappdb</postgres.refapp.db>
                <postgres.refapp.user>refapp</postgres.refapp.user>
                <postgres.refapp.password>hunter2</postgres.refapp.password>
                <!-- Refapp will create this schema if it doesn't exist, see SchemaCreator -->
                <postgres.refapp.schema>refappsc</postgres.refapp.schema>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <configuration>
                            <!-- Maven will merge this configuration tree-wise with the generic AMPS config above -->
                            <systemProperties>
                                <!-- See the Javadoc for ConnectionProvider -->
                                <refapp.jdbc.app.url>jdbc:postgresql://${postgres.host}:${postgres.port}/${postgres.refapp.db}</refapp.jdbc.app.url>
                                <refapp.jdbc.app.user>${postgres.refapp.user}</refapp.jdbc.app.user>
                                <refapp.jdbc.app.pass>${postgres.refapp.password}</refapp.jdbc.app.pass>
                                <refapp.jdbc.app.schema>${postgres.refapp.schema}</refapp.jdbc.app.schema>
                                <refapp.jdbc.driver.class.name>org.postgresql.Driver</refapp.jdbc.driver.class.name>
                                <refapp.jdbc.external>true</refapp.jdbc.external>
                            </systemProperties>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>42.2.18</version>
                                </libArtifact>
                            </libArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
