<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>public-pom</artifactId>
        <version>2.0.1</version>
    </parent>
    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>maven-atlassian-source-distribution-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <name>Maven Atlassian Source Distribution Plugin</name>
    <version>4.2.6</version>
    <url>http://www.atlassian.com/</url>
    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/buildeng/maven-atlassian-source-distribution-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/buildeng/maven-atlassian-source-distribution-plugin.git</developerConnection>
        <url>https://stash.atlassian.com/projects/BUILDENG/repos/maven-atlassian-source-distribution-plugin/browse</url>
    </scm>
    <properties>
        <mavenVersion>2.1.0</mavenVersion>
        <tests.it />
    </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
      <dependency>
          <groupId>org.apache.maven.plugin-tools</groupId>
          <artifactId>maven-plugin-annotations</artifactId>
          <version>3.1</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven.shared</groupId>
          <artifactId>maven-invoker</artifactId>
          <version>2.0.9</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-plugin-api</artifactId>
          <version>${mavenVersion}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-project</artifactId>
          <version>${mavenVersion}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-artifact</artifactId>
          <version>${mavenVersion}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-model</artifactId>
          <version>${mavenVersion}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-core</artifactId>
          <version>${mavenVersion}</version>
          <scope>provided</scope>
          <exclusions>
              <exclusion>
                  <groupId>org.slf4j</groupId>
                  <artifactId>jcl-over-slf4j</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>commons-cli</groupId>
                  <artifactId>commons-cli</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>commons-lang</groupId>
          <artifactId>commons-lang</artifactId>
          <version>2.3</version>
      </dependency>
      <dependency>
          <groupId>commons-io</groupId>
          <artifactId>commons-io</artifactId>
          <version>2.4</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven.shared</groupId>
          <artifactId>maven-dependency-tree</artifactId>
          <version>2.0</version>
      </dependency>
      <dependency>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-utils</artifactId>
          <version>3.0.8</version>
      </dependency>

      <dependency>
          <groupId>org.mockito</groupId>
          <artifactId>mockito-all</artifactId>
          <version>1.9.5</version>
          <scope>test</scope>
      </dependency>
  </dependencies>
  <build>
      <pluginManagement>
          <plugins>
              <plugin>
                  <artifactId>maven-invoker-plugin</artifactId>
                  <version>1.7</version>
                  <configuration>
                      <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                      <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                      <settingsFile>${user.home}/.m2/settings.xml</settingsFile>
                  </configuration>
                  <dependencies>
                      <dependency>
                          <groupId>commons-io</groupId>
                          <artifactId>commons-io</artifactId>
                          <version>2.4</version>
                      </dependency>
                  </dependencies>
              </plugin>
          </plugins>
      </pluginManagement>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-plugin-plugin</artifactId>
              <version>3.2</version>
              <configuration>
                  <goalPrefix>mojo</goalPrefix>
                  <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
              </configuration>
              <executions>
                  <execution>
                      <id>mojo-descriptor</id>
                      <goals>
                          <goal>descriptor</goal>
                      </goals>
                  </execution>
                  <execution>
                      <id>help-goal</id>
                      <goals>
                          <goal>helpmojo</goal>
                      </goals>
                  </execution>
              </executions>
          </plugin>
      </plugins>
  </build>

  <profiles>
    <profile>
        <id>run-all-its</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>integration-test-ci</id>
                            <goals>
                                <goal>install</goal>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <skipInvocation>${skipTests}</skipInvocation>
                                <pomIncludes>
                                    <pomInclude>*/pom.xml</pomInclude>
                                </pomIncludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
    <profile>
        <id>run-subset-its</id>
        <activation>
            <property>
                <name>tests.it</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>integration-test-subset</id>
                            <goals>
                                <goal>install</goal>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <pomIncludes>
                                    <pomInclude>${tests.it}/pom.xml</pomInclude>
                                </pomIncludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
  </profiles>

</project>
