<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>
  <groupId>com.github.ferstl</groupId>
  <artifactId>junit-testgroups</artifactId>
  <version>1.0.1</version>
  <name>JUnit Test Groups</name>
  <description>
    Divides your JUnit tests into groups which can be executed separately or all at once 
  </description>
  <url>https://github.com/ferstl/junit-testgroups</url>
  <licenses>
    <license>
      <name>MIT</name>
      <url>http://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>ferstl</id>
      <name>Stefan Ferstl</name>
      <email>st.ferstl@gmail.com</email>
      <url>https://github.com/ferstl</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:ferstl/junit-testgroups.git</connection>
    <developerConnection>scm:git:git@github.com:ferstl/junit-testgroups.git</developerConnection>
    <url>${project.url}</url>
    <tag>junit-testgroups-1.0.1</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>${distribution.release.id}</id>
      <url>${distribution.release.url}</url>
    </repository>
    <snapshotRepository>
      <id>${distribution.snapshot.id}</id>
      <url>${distribution.snapshot.url}</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <!-- Plugin versions. -->
    <maven-license-plugin.version>1.9.0</maven-license-plugin.version>
    <maven-compiler-plugin.version>3.2</maven-compiler-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
    <maven-release-plugin.version>2.5.1</maven-release-plugin.version>
    <maven-source-plugin.version>2.4</maven-source-plugin.version>
    <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>


    <!-- Other settings. -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <optional>true</optional>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>java-hamcrest</artifactId>
      <version>2.0.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>${maven-license-plugin.version}</version>
          <configuration>
            <header>${basedir}/src/etc/header.txt</header>
            <strictCheck>true</strictCheck>
            <mapping>
              <java>SLASHSTAR_STYLE</java>
            </mapping>
            <includes>
              <include>src/main/**</include>
              <include>src/test/java/**</include>
            </includes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Pdeploy-to-sonatype-oss</arguments>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
          <configuration>
            <excludes>
              <exclude>**/PackageTest.java</exclude>
              <exclude>**/SubPackageTest.java</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>deploy-to-sonatype-oss</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <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>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>