<?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.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>6.0.0</version>
    </parent>

    <groupId>com.atlassian.plugins</groupId>
    <artifactId>atlassian-plugins-parent</artifactId>
    <version>5.3.7-506c317e3</version>
    <packaging>pom</packaging>

    <name>Atlassian Plugins - Parent POM</name>
    <url>http://docs.atlassian.com/${project.artifactId}/${project.version}</url>
    <licenses>
        <license>
            <name>BSD License</name>
            <url>http://opensource.org/licenses/BSD-3-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>atlassian-plugins-servlet</module>
        <module>atlassian-plugins-osgi-bridge</module>
        <module>atlassian-plugins-osgi-events</module>
        <module>atlassian-plugins-osgi-spring-extender</module>
        <module>atlassian-plugins-framework-bundles</module>
        <module>atlassian-plugins-osgi</module>
        <module>atlassian-plugins-spring</module>
        <module>atlassian-plugins-core</module>
        <module>atlassian-plugins-eventlistener</module>
        <module>atlassian-plugins-test-resources</module>
        <module>atlassian-plugins-main</module>
        <module>atlassian-plugins-schema</module>
        <module>atlassian-plugins-webresource-common</module>
        <module>atlassian-plugins-validation</module>
        <module>atlassian-plugins-api</module>
        <module>atlassian-plugins-refimpl-plugin</module>
    </modules>

    <scm>
        <connection>scm:git:git@bitbucket.org:atlassian/atlassian-plugins.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:atlassian/atlassian-plugins.git</developerConnection>
        <url>https://bitbucket.org/atlassian/atlassian-plugins</url>
        <tag>atlassian-plugins-parent-5.3.7-506c317e3</tag>
    </scm>
    <issueManagement>
        <system>Jira</system>
        <url>https://ecosystem.atlassian.net/browse/PLUG</url>
    </issueManagement>
    <ciManagement>
        <system>Bamboo</system>
        <url>https://ecosystem-bamboo.internal.atlassian.com/browse/PLUG</url>
    </ciManagement>

    <properties>
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
        <modules.jvm.args />
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>

        <!-- TODO: javadoc is broken for 1.8 - see PLUG-1151 -->
        <javadoc.additional.params>-Xdoclint:none</javadoc.additional.params>

        <platform.version>5.0.9</platform.version>

        <geminiBlueprintVersion>3.0.0.M01</geminiBlueprintVersion>
        <geminiOsgiImportVersion>3.0</geminiOsgiImportVersion>

        <aopAllianceBundleVersion>1.0_6</aopAllianceBundleVersion>

        <spring50xBundleVersion>5.0.10.RELEASE_1</spring50xBundleVersion>
        <spring51xBundleVersion>5.1.14.RELEASE_1</spring51xBundleVersion>
        <springBundleVersion>${spring51xBundleVersion}</springBundleVersion>
        <springOsgiImportVersion>5.0</springOsgiImportVersion>
        <springTestClassifier>spring51x</springTestClassifier>

        <velocityBundleVersion>1.7_6</velocityBundleVersion>

        <felix.version>5.6.12</felix.version>

        <jaxb.version>2.3.0</jaxb.version>

        <json-lib.classifier>jdk15</json-lib.classifier>

        <atlassianInstrumentationVersion>3.0.0</atlassianInstrumentationVersion>
        <atlassianSecureXmlVersion>3.1.4</atlassianSecureXmlVersion>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>platform</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>third-party</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi-bridge</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-servlet</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins.test</groupId>
                <artifactId>atlassian-plugins-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-framework-bundles</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-main</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-spring</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-schema</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>${jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-core</artifactId>
                <version>${jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>${jaxb.version}</version>
            </dependency>

            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.jdmk</groupId>
                        <artifactId>jmxtools</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.sun.jmx</groupId>
                        <artifactId>jmxri</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.jms</groupId>
                        <artifactId>jms</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.activation</groupId>
                        <artifactId>activation</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.jsr305</artifactId>
                <version>3.0.2_1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-core</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-expression</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-beans</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-aop</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.aopalliance</artifactId>
                <version>${aopAllianceBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-context</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-context-support</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-web</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.spring-webmvc</artifactId>
                <version>${springBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.gemini.blueprint</groupId>
                <artifactId>gemini-blueprint-core</artifactId>
                <version>${geminiBlueprintVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.gemini.blueprint</groupId>
                <artifactId>gemini-blueprint-extender</artifactId>
                <version>${geminiBlueprintVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.gemini.blueprint</groupId>
                <artifactId>gemini-blueprint-io</artifactId>
                <version>${geminiBlueprintVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.velocity</artifactId>
                <version>${velocityBundleVersion}</version>
            </dependency>
            <dependency>
                <groupId>dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>1.6.1-atlassian-2</version>
                <exclusions>
                    <exclusion>
                        <groupId>saxpath</groupId>
                        <artifactId>saxpath</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>msv</groupId>
                        <artifactId>msv</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>relaxngDatatype</groupId>
                        <artifactId>relaxngDatatype</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>isorelax</groupId>
                        <artifactId>isorelax</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.framework</artifactId>
                <version>${felix.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>3.2.2</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.instrumentation</groupId>
                <artifactId>atlassian-instrumentation-core</artifactId>
                <version>${atlassianInstrumentationVersion}</version>
            </dependency>
            <dependency>
                <groupId>jaxen</groupId>
                <artifactId>jaxen</artifactId>
                <version>1.1.6</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.security</groupId>
                <artifactId>atlassian-secure-xml</artifactId>
                <version>${atlassianSecureXmlVersion}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-core</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!--
      Until Blueprint 2.x is officially release, we need to have this here
      See https://extranet.atlassian.com/jira/browse/BUILDENG-6870
    -->
    <repositories>
        <repository>
            <id>blueprint-snapshots</id>
            <url>https://repo.eclipse.org/content/repositories/gemini-blueprint-snapshots/</url>
        </repository>
    </repositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine>${modules.jvm.args}</argLine>
                        <systemProperties>
                            <property>
                                <name>project.version</name>
                                <value>${project.version}</value>
                            </property>
                        </systemProperties>
                        <excludes>
                            <exclude>it/**/*</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <phase>integration-test</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                            <configuration>
                                <excludes>
                                    <exclude>none</exclude>
                                </excludes>
                                <includes>
                                    <include>it/**/*</include>
                                </includes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </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 hamcrest-all and mockito-all are not accidentally
                                            included as transitive dependency. Use hamcrest-core,
                                            hamcrest-library or mockito-core instead
                                        </message>
                                        <excludes>
                                            <exclude>org.mockito:mockito-all</exclude>
                                            <exclude>org.hamcrest:hamcrest-all</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                    <bannedDependencies>
                                        <searchTransitive>true</searchTransitive>
                                        <message>make sure servlet-api 2.5 and before is not included as a dependency</message>
                                        <excludes>
                                            <exclude>javax.servlet:servlet-api</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                </rules>
                                <fail>true</fail>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-project-info-reports-plugin</artifactId>
               <reportSets>
                  <reportSet>
                      <reports>
                          <report>index</report>
                      </reports>
                  </reportSet>
               </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>produceDocumentation</id>
            <distributionManagement>
                <site>
                    <id>atlassian-documentation</id>
                    <url>scpexe://docs-app.internal.atlassian.com/var/www/domains/docs.atlassian.com/${project.artifactId}/${project.version}</url>
                </site>
            </distributionManagement>
        </profile>

        <profile>
            <id>jdk9plus</id>
            <activation>
                <jdk>[1.9,)</jdk>
            </activation>
            <properties>
                <!-- warn consistently when running on Java 9 or higher to find all places that do illegal access -->
                <custom.jvm.args>--illegal-access=warn</custom.jvm.args>
            </properties>
        </profile>

        <!-- Used to run tests with Spring 5.0.x, rather than the default 5.1.x -->
        <profile>
            <id>spring50x</id>
            <properties>
                <springBundleVersion>${spring50xBundleVersion}</springBundleVersion>
                <springTestClassifier>spring50x</springTestClassifier>
            </properties>
        </profile>
    </profiles>
</project>
