<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.jknack</groupId>
  <artifactId>semver.java</artifactId>
  <packaging>jar</packaging>
  <version>0.1.0</version>

  <name>Semantic Versioning</name>

  <description>Semantic Versioning Implementation</description>

  <url>https://github.com/jknack/semver.java</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>jknack</id>
      <name>Edgar Espina</name>
      <url>https://github.com/jknack</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:jknack/semver.java.git
    </connection>
    <developerConnection>scm:git:git@github.com:jknack/semver.java.git
    </developerConnection>
    <url>scm:git:git@github.com:jknack/semver.java.git</url>
    <tag>v0.1.0</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/
      </url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
      </url>
    </repository>
  </distributionManagement>

  <dependencies>
    <!-- Commons Lang3 -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.1</version>
    </dependency>

    <!-- Logging System -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.6.4</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.0.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <version>4.10</version>
    </dependency>

    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>3.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-easymock</artifactId>
      <version>1.4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.easymock</groupId>
          <artifactId>easymock</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>1.4.12</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <!-- We're on 1.6 -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <!-- Eclipse setup -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>

      <!-- Checkstyle -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <consoleOutput>true</consoleOutput>
          <configLocation>checkstyle.xml</configLocation>
          <failsOnError>true</failsOnError>
        </configuration>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>none</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.10.b1</version>
        <configuration>
          <header>LICENSE</header>
          <strictCheck>true</strictCheck>
          <skipExistingHeaders>true</skipExistingHeaders>
          <includes>
            <include>src/main/java/**/*.java</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Release plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <useReleaseProfile>false</useReleaseProfile>
          <arguments>-Psonatype-oss-release</arguments>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <scmCommentPrefix>release</scmCommentPrefix>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- GPG -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <properties>
    <!-- Encoding UTF-8 -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jackson2-version>2.1.0</jackson2-version>
  </properties>
</project>
