<?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.perforce.p4maven</groupId>
    <artifactId>p4maven</artifactId>
    <version>1.0.5</version>
  </parent>

  <artifactId>p4maven-provider</artifactId>

  <name>Perforce Maven SCM Provider</name>
  <description>Maven SCM Provider implementation for Perforce using P4Java.</description>

  <properties>
    <skipTests>true</skipTests>
    <metadata.package>com.perforce.maven.scm.provider</metadata.package>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.perforce</groupId>
      <artifactId>p4java</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.release</groupId>
      <artifactId>maven-release-manager</artifactId>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-sec-dispatcher</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skipTests>${skipTests}</skipTests>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>create-component-descriptor</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.modello</groupId>
        <artifactId>modello-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
              <goal>xpp3-reader</goal>
              <goal>xpp3-writer</goal>
              <goal>xsd</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <version>1.0.0</version>
          <useJava5>true</useJava5>
          <models>
            <model>src/main/mdo/p4maven-settings.mdo</model>
          </models>
        </configuration>
      </plugin>

    </plugins>

  </build>

  <profiles>

    <profile>
      <id>run-tck</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <!-- main config is at parent -->
              <pomExcludes>
                <!-- only use this to populate test data for brand new test depot -->
                <pomExclude>initial-data/pom.xml</pomExclude>
                <pomExclude>release/pom.xml</pomExclude>
              </pomExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>run-its-at-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <pomExcludes>
                <!-- only use this to populate test data for brand new test depot -->
                <pomExclude>initial-data/pom.xml</pomExclude>
              </pomExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
