<?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>3.0.89</version>
        <relativePath>../base-pom</relativePath>
    </parent>

    <artifactId>closedsource-pom</artifactId>
    <packaging>pom</packaging>

    <name>Atlassian Closed Source POM</name>

    <distributionManagement>
        <repository>
            <id>atlassian-m2-repository</id>
            <name>Atlassian Public Repository</name>
            <url>https://maven.atlassian.com/public</url>
        </repository>
        <snapshotRepository>
            <id>atlassian-private-snapshot</id>
            <name>Atlassian Private Snapshot Repository</name>
            <url>https://maven.atlassian.com/private-snapshot</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <altDeploymentRepository>
                        atlassian-m2-snapshot-repository::default::https://maven.atlassian.com/public-snapshot
                    </altDeploymentRepository>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-source-routes-plugin</artifactId>
                    <version>1.7</version>
                    <configuration>
                        <distributionManagement>
                            <repository>
                                <id>atlassian-private</id>
                                <name>Atlassian Private Repository</name>
                                <url>https://maven.atlassian.com/private</url>
                            </repository>
                            <snapshotRepository>
                                <id>atlassian-private-snapshot</id>
                                <name>Atlassian Private Snapshot Repository</name>
                                <url>https://maven.atlassian.com/private-snapshot</url>
                            </snapshotRepository>
                        </distributionManagement>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <inherited>false</inherited>
                        <configuration>
                            <altDeploymentRepository>
                                atlassian-m2-repository::default::https://maven.atlassian.com/public
                            </altDeploymentRepository>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>false</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-source-routes-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create-sources</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>route</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>nexusStaging</id>
            <activation>
              <property>
                <name>!skip.nexus.staging</name>
              </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
