<?xml version="1.0" ?>
<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>
        <artifactId>base-pom</artifactId>
        <version>5.0.9-BE-TEST-01</version>
        <relativePath>../base-pom</relativePath>
    </parent>

    <artifactId>central-pom</artifactId>
    <packaging>pom</packaging>

    <name>Atlassian Central POM</name>

    <distributionManagement>
        <repository>
            <id>maven-atlassian-com</id>
            <name>Atlassian Central Repository</name>
            <url>https://packages.atlassian.com/maven/central</url>
        </repository>
        <snapshotRepository>
            <id>maven-atlassian-com</id>
            <name>Atlassian Central Snapshot Repository</name>
            <url>https://packages.atlassian.com/maven/central-snapshot</url>
        </snapshotRepository>
    </distributionManagement>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <issueManagement>
        <system>JIRA</system>
        <url>https://jira.atlassian.com/browse/APUBPOM</url>
    </issueManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
            </plugin>
        </plugins>
    </reporting>

    <build>
        <extensions>
            <extension>
                <groupId>com.github.shyiko.servers-maven-extension</groupId>
                <artifactId>servers-maven-extension</artifactId>
                <version>1.3.1</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.jfrog.buildinfo</groupId>
                <artifactId>artifactory-maven-plugin</artifactId>
                <version>2.6.1</version>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>publish</goal>
                        </goals>
                        <configuration>
                            <publisher>
                                <contextUrl>https://packages.atlassian.com</contextUrl>
                                <username>${settings.servers.maven-atlassian-com.username}</username>
                                <password>${settings.servers.maven-atlassian-com.password}</password>
                                <repoKey>maven-central-local</repoKey>
                                <snapshotRepoKey>maven-central-snapshot-local</snapshotRepoKey>
                            </publisher>
                            <buildInfo>
                                <agentName> {{bamboo_agentId}} </agentName>
                                <buildName>${project.name}</buildName>
                                <buildNumber>{{ "${project.version}-${maven.build.timestamp}" }}</buildNumber>
                                <buildNumbersNotToDelete>1</buildNumbersNotToDelete>
                                <buildRetentionMaxDays>30</buildRetentionMaxDays>
                                <buildRetentionCount>5</buildRetentionCount>
                                <buildUrl> {{bamboo_resultsUrl}} </buildUrl>
                            </buildInfo>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>artifactory-staging-maven-plugin</artifactId>
                <version>1.0.3</version>
                <extensions>true</extensions>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- deployments without crypto signatures, sources, and javadoc will be rejected -->
            <!-- use the 'release' profile to generate and include these in the deployment -->
            <id>release</id>
            <build>
                <plugins>
                    <!-- this plugin is required to ensure Central Repository's requirements are met -->
                    <!-- https://docs.sonatype.org/display/Repository/Central+Sync+Requirements -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <!-- javadoc generation found in base-bom when using 'release' profile -->
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
