<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.pom</groupId>
        <!-- Note that the main difference between the Atlassian base poms is where we deploy artifacts,
             but we currently specify deployment information directly in ant rather than using the
             distribution management from the pom.  See build.xml:deploy-maven-production
             and https://extranet.atlassian.com/display/FECRU/What+fecru+artifacts+get+deployed+where -->
        <artifactId>closedsource-pom</artifactId>
        <version>3.0.30</version>
    </parent>

    <groupId>com.atlassian.fisheye</groupId>
    <artifactId>atlassian-fisheye-root</artifactId>
    <version>3.7.0-20150127093303</version>
    <packaging>pom</packaging>

    <licenses>
	<license>
	    <name>Atlassian 3.0 End User License Agreement</name>
	    <url>http://www.atlassian.com/end-user-agreement/</url>
	    <distribution>repo</distribution>
	</license>
    </licenses>

    <modules><!-- see also profiles that are active by default. -->
        <module>bundled-plugins</module>
        <module>dependencies</module>
        <module>dbdriver/postgresql</module>
        <module>wadl-dependencies</module>
        <module>fecru-gadgets-plugin</module>
        <module>fecru-rest-plugin</module>
        <module>salplugin</module>
        <module>src/amps</module>
        <module>src/api</module>
        <module>src/atlassian-fisheye-provided-libs</module>
        <module>src/bundled-plugins</module>
        <module>src/dist-cru</module>
        <module>src/dist-fe</module>
        <module>src/dist-cru-jspsource</module>
        <module>src/dist-fe-jspsource</module>
        <module>src/fe-jar</module>
        <module>src/scmutils</module>
    </modules>

    <profiles>
        <profile>
            <id>include-build-and-test</id>
            <activation>
                <!-- This profile is on by default, so that the modules get into an IDE's model of the pom.
                     But they don't get included in production or licensing. -->
                <property><name>!production.only</name></property>
            </activation>
            <modules>
                <module>build-dependencies</module>
                <module>dbdriver/mysql</module>
                <module>etc/scm-hg-bin</module>
                <module>etc/upgrade-path</module>
                <module>fe-vis-highlighter-plugin</module>
                <module>etc/browsers</module>
                <module>modules</module>
                <module>src/fe-tests</module>
                <module>test/plugins</module>
            </modules>
        </profile>
        <profile>
            <id>private-snapshot-deploy</id>
            <properties>
                <deploymentUrl>${rootDeployUrl}/private-snapshot</deploymentUrl>
                <repositoryId>atlassian-private-snapshot</repositoryId>
            </properties>
        </profile>
        <profile>
            <id>public-snapshot-deploy</id>
            <properties>
                <deploymentUrl>${rootDeployUrl}/public-snapshot</deploymentUrl>
                <repositoryId>atlassian-public-snapshot</repositoryId>
            </properties>
        </profile>
        <profile>
            <id>private-prod-deploy</id>
            <properties>
                <deploymentUrl>${rootDeployUrl}/private</deploymentUrl>
                <repositoryId>atlassian-private</repositoryId>
            </properties>
        </profile>
        <profile>
            <id>public-prod-deploy</id>
            <properties>
                <deploymentUrl>${rootDeployUrl}/public</deploymentUrl>
                <repositoryId>maven-atlassian-com</repositoryId>
            </properties>
        </profile>
        <profile>
            <!-- Specify this profile when we do deploys via ant. This can't be done outside a profile as it
                 interacts poorly with the atlassian license plugin, which relies on distribution management. -->
            <id>url-based-deploy</id>
            <properties>
                <rootDeployUrl>https://maven.atlassian.com</rootDeployUrl>
                <!-- change the rootDeployUrl to this for testing. -->
                <!--<rootDeployUrl>file:///tmp/dummy-maven-repo</rootDeployUrl>-->
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <version>${project.version}</version>
                            <packaging>pom</packaging>
                            <url>${deploymentUrl}</url>
                            <repositoryId>${repositoryId}</repositoryId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-core</artifactId>
                <version>${ATLASSIAN_PLUGINS_VERSION}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webfragment</artifactId>
                <version>${ATLASSIAN_PLUGINS_WEBFRAGMENT}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource</artifactId>
                <version>${ATLASSIAN_PLUGINS_WEBRESOURCE}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.event</groupId>
                <artifactId>atlassian-event</artifactId>
                <version>${ATLASSIAN_EVENT_VERSION}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.util.concurrent</groupId>
                <artifactId>atlassian-util-concurrent</artifactId>
                <version>${ATLASSIAN_UTIL_CONCURRENT_VERSION}</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.0</version>
            </dependency>
            <dependency>
                <groupId>opensymphony</groupId>
                <artifactId>oscore</artifactId>
                <version>2.2.7</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.fisheye</groupId>
                <artifactId>atlassian-fisheye-dependencies</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
            </dependency>
            <!-- the fisheye-api is not a dependency of the main fisheye pom, because it is built from source in the
                fisheye project as part of the fisheye build, but fisheye-jar does depend on it. -->
            <dependency>
                <groupId>com.atlassian.fisheye</groupId>
                <artifactId>atlassian-fisheye-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.fisheye</groupId>
                <artifactId>fisheye-jar</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${ATLASSIAN_GUAVA_VERSION}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>1.3.9</version>
            </dependency>
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>1.4</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.renderer</groupId>
                <artifactId>atlassian-renderer</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>xerces</groupId>
                        <artifactId>xmlParserAPIs</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>xerces</groupId>
                        <artifactId>xercesImpl</artifactId>
                    </exclusion>
                    <!--Until renderer upgrades the version of neko, exclude transitive dep and include as a direct dep.-->
                    <!-- nekohtml is used for the RTE support in renderer, which Crucible doesn't use. -->
                    <!--see also: http://jira.atlassian.com/browse/RNDR-118-->
                    <exclusion>
                        <groupId>net.sourceforge.nekohtml</groupId>
                        <artifactId>nekohtml</artifactId>
                    </exclusion>
                </exclusions>
                <version>8.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.extras</groupId>
                <artifactId>atlassian-extras</artifactId>
                <version>2.5</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <!-- Java Platform -->
        <ATLASSIAN_PLUGINS_VERSION>3.0.16</ATLASSIAN_PLUGINS_VERSION>
        <ATLASSIAN_PLUGINS_WEBRESOURCE>3.0.7</ATLASSIAN_PLUGINS_WEBRESOURCE>
        <ATLASSIAN_PLUGINS_WEBFRAGMENT>3.0.1</ATLASSIAN_PLUGINS_WEBFRAGMENT>
        <SAL_VERSION>2.10.20</SAL_VERSION>
        <ATLASSIAN_REST_VERSION>2.9.7</ATLASSIAN_REST_VERSION>
        <AUI_VERSION>5.5.2</AUI_VERSION>
        <TEMPLATE_RENDERER_VERSION>1.5.4</TEMPLATE_RENDERER_VERSION>
        <UPM_VERSION>2.17.6</UPM_VERSION>
        <ATLASSIAN_EVENT_VERSION>2.3.5</ATLASSIAN_EVENT_VERSION>
        <OAUTH_VERSION>1.9.6</OAUTH_VERSION>
        <ATLASSIAN_TRUSTED_APPS_VERSION>3.0.3</ATLASSIAN_TRUSTED_APPS_VERSION>
        <APPLINKS_VERSION>4.3.5</APPLINKS_VERSION>
        <STREAMS_VERSION>5.3.27</STREAMS_VERSION>
        <WEBHOOKS_VERSION>0.17.6</WEBHOOKS_VERSION>
        <!-- change the version number in FisheyePackageScannerConfiguration when you change this -->
        <GUAVA_VERSION>11.0.2-atlassian-02</GUAVA_VERSION>
        <GUAVA_OSGI_VERSION>11.0.1</GUAVA_OSGI_VERSION>
        <ATLASSIAN_GUAVA_VERSION>15.0</ATLASSIAN_GUAVA_VERSION>
        <FUGUE_VERSION>2.1.0</FUGUE_VERSION>
        <HEALTHCHECK_PLUGIN_VERSION>2.0.7</HEALTHCHECK_PLUGIN_VERSION>
        <PRETTY_URL_VERSION>1.11.0</PRETTY_URL_VERSION>
        <ATLASSIAN_ANNOTATIONS>0.9</ATLASSIAN_ANNOTATIONS>
        <JQUERY_PLUGIN_VERSION>1.8.3</JQUERY_PLUGIN_VERSION>
        <FAILURE_CACHE_VERSION>0.14</FAILURE_CACHE_VERSION>
        <NAVLINKS_VERSION>3.3.1</NAVLINKS_VERSION>
        <ATLASSIAN_UTIL_CONCURRENT_VERSION>2.4.1</ATLASSIAN_UTIL_CONCURRENT_VERSION>
        <ACTIVEOBJECTS_VERSION>0.25.2</ACTIVEOBJECTS_VERSION>
        <DARK_FEATURES_UI_VERSION>0.7.1</DARK_FEATURES_UI_VERSION>

        <!-- Non-platform but investigate updating these along with platform -->
        <JIRA_INTEGRATION_VERSION>1.5.14</JIRA_INTEGRATION_VERSION>
        <SUPPORT_TOOLS_PLUGIN_VERSION>3.0.17</SUPPORT_TOOLS_PLUGIN_VERSION>
        <REMOTE_EVENTS_VERSION>1.0.1</REMOTE_EVENTS_VERSION>
        <LINK_AGGREGATOR_VERSION>2.0.11</LINK_AGGREGATOR_VERSION>
        <SOY_TEMPLATE_VERSION>2.7.0</SOY_TEMPLATE_VERSION>
        <ATLASSIAN_SECURITY_VERSION>3.1.4</ATLASSIAN_SECURITY_VERSION>
        <ATLASSIAN_CACHE_VERSION>2.1.0</ATLASSIAN_CACHE_VERSION>
        
        <!-- WARNING WARNING WARNING -->
        <!-- Version 3.50 of the Analytics plugin exports an implementation of
        AnalyticsConfigService which had to be temporarily removed in later versions.
        DO NOT BUMP THIS TO A VERSION THAT DOES NOT EXPORT AN AnalyticsConfigService IMPLEMENTATION.
        
        Check with Richard Stephens or Leo Balan if unsure.
        --><ANALYTICS_PLUGIN_VERSION>3.50.2</ANALYTICS_PLUGIN_VERSION><!-- END WARNING -->

        <ANALYTICS_WHITELIST_VERSION>3.33</ANALYTICS_WHITELIST_VERSION>

        <!-- Other dependencies -->
        <ATLASSIAN_LESS_VERSION>2.1.0</ATLASSIAN_LESS_VERSION>
        <GADGETS_VERSION>3.2.1</GADGETS_VERSION>
        <GWT_VERSION>2.5.1</GWT_VERSION>
        <JETTY_VERSION>8.1.10.v20130312</JETTY_VERSION>
        <SPRING_VERSION>3.1.4.RELEASE</SPRING_VERSION>
        <SPRING_OSGI_VERSION>1.2.1</SPRING_OSGI_VERSION>
        <LOG4J_VERSION>1.2.16</LOG4J_VERSION>
        <SLF4J_VERSION>1.6.4</SLF4J_VERSION>
        <COMMONS_LANG_VERSION>2.6</COMMONS_LANG_VERSION>
        <SCALA_PROVIDER_VERSION>0.5</SCALA_PROVIDER_VERSION>

        <!-- WARNING!
             Before changing SVNKIT_VERSION ensure SVNKit license purchased by Atlassian allows this version.
             More info: https://extranet.atlassian.com/display/FECRU/FeCru+Licensing
          -->
        <SVNKIT_VERSION>1.8.6-r546df150-t20140430_1135</SVNKIT_VERSION>

        <!-- browsers, atlassian-selenium and selenium need to be kept compatible but can be updated independently -->
        <ATLASSIAN_BROWSERS_VERSION>2.5</ATLASSIAN_BROWSERS_VERSION>
        <ATLASSIAN_SELENIUM_VERSION>2.2-m04</ATLASSIAN_SELENIUM_VERSION>
        <SELENIUM_VERSION>2.33.0</SELENIUM_VERSION>
        <JUNIT_VERSION>4.11</JUNIT_VERSION>

        <!-- Environment variables or similar -->
        <source.level>1.6</source.level>
        <!-- We have some dependencies on milestones and release candidates we need to deal with before we can
             turn this on. -->
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>0.20</version>
                    <configuration>
                        <licensesDirectory>${user.dir}/output/dist/licenses</licensesDirectory>
                        <bomFile>${user.dir}/output/dist/content/WEB-INF/classes/licenses-bom.csv</bomFile>
                        <nonMavenDependenciesFile>${user.dir}/third-party-licensing/missing-non-maven-dependencies.properties</nonMavenDependenciesFile>
                        <ignoredMavenScopes>test,provided</ignoredMavenScopes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>ban-milestones-and-release-candidates</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <banVersionDeps>
                                        <excludes>
                                            <!-- We should upgrade to non milestones of these, but it's not like you die. -->
                                            <exclude>com.atlassian.selenium:atlassian-webdriver-core</exclude>
                                            <exclude>com.atlassian.selenium:atlassian-pageobjects-elements</exclude>
                                            <exclude>com.atlassian.jira:jira-rest-java-client-core:jar:2.0.0-m30</exclude>
                                        </excludes>
                                        <searchTransitive>false</searchTransitive>
                                        <ignoreTest>true</ignoreTest>
                                    </banVersionDeps>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <configuration>
                        <useJvmChmod>true</useJvmChmod>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
