<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.eis.libraries</groupId>
  <artifactId>minimal-di</artifactId>
  <version>1.0</version>
  <packaging>jar</packaging>

  <name>Minimal DI</name>
  <url>http://eis.github.io/minimal-di/</url>
  <description>This is a minimal dependency injection framework.</description>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/eis/minimal-di/issues</url>
  </issueManagement>

  <ciManagement>
    <system>Travis</system>
    <url>https://travis-ci.org/eis/minimal-di</url>
  </ciManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <licenses>
      <license>
          <name>Apache License</name>
          <url>http://www.apache.org/licenses/LICENSE-2.0</url>
          <distribution>repo</distribution>
      </license>
  </licenses>

  <scm>
      <url>https://github.com/eis/minimal-di</url>
      <connection>scm:git:git://github.com/eis/minimal-di.git</connection>
      <developerConnection>scm:git:git@github.com:eis/minimal-di.git</developerConnection>
    <tag>minimal-di-1.0</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.7</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
  </properties>

  <developers>
    <developer>
      <id>eis</id>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>+2</timezone>
    </developer>
  </developers>

  <profiles>
      <profile>
          <id>release-sign-artifacts</id>
          <activation>
              <property>
                  <name>performRelease</name>
                  <value>true</value>
              </property>
          </activation>
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <version>1.5</version>
                      <!--
                      Commenting this out so this will be asked interactively
                      <configuration>
                          <passphrase>${gpg.passphrase}</passphrase>
                      </configuration>
                      -->
                      <executions>
                          <execution>
                              <id>sign-artifacts</id>
                              <phase>verify</phase>
                              <goals>
                                  <goal>sign</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      <exclusions>
        <!-- we prefer hamcrest-library as it is more complete -->
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- default compiler options -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <!-- release + sign -->
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <!-- DO NOT USE <2.5, see https://jira.codehaus.org/browse/MRELEASE-812 -->
          <version>2.5.1</version>
          <configuration>
          <!--
              Commenting this out so this will be asked interactively
              <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
              -->
              <!-- see http://jira.codehaus.org/browse/MGPG-9 -->
              <mavenExecutorId>forked-path</mavenExecutorId>
          </configuration>
      </plugin>
      <!-- source and javadoc releases -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- integration tests -->
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.14</version>
          <executions>
              <execution>
                  <goals>
                      <goal>integration-test</goal>
                  </goals>
              </execution>
              <!-- separate verify phase is needed, otherwise build is success even if tests fail -->
              <!-- details: http://stackoverflow.com/questions/16797601/maven-failsafe-plugin-errors-and-build-success-->
              <execution>
                <id>verify</id>
                <phase>verify</phase>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
          </executions>
      </plugin>
      <plugin>
          <!--
              pitest doesn't (yet) support maven site goal,
              so we can only run it for local checking.
              See https://github.com/hcoles/pitest/issues/10

              Run with mvn org.pitest:pitest-maven:scmMutationCoverage
          -->
          <groupId>org.pitest</groupId>
          <artifactId>pitest-maven</artifactId>
          <version>1.1.2</version>
          <configuration>
            <targetClasses>
              <param>fi.eis.libraries*</param>
            </targetClasses>
            <targetTests>
              <param>fi.eis.libraries*</param>
            </targetTests>
            <mutators>
              <mutator>ALL</mutator>
            </mutators>
            <outputFormats>
              <outputFormat>HTML</outputFormat>
              <outputFormat>XML</outputFormat>
            </outputFormats>
            <timestampedReports>false</timestampedReports>
            <avoidCallsTo>
              <param>fi.eis.libraries.di.SimpleLogger</param>
            </avoidCallsTo>
          </configuration>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <!-- as exampled in http://www.mkyong.com/qa/maven-cobertura-code-coverage-example/ -->
      <!-- Normally, we take off the dependency report, saves time. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
      </plugin>

      <!-- integrate maven-cobertura-plugin to project site -->
      <!--
        note a known problem with UTF-8, https://github.com/cobertura/cobertura/issues/111, which is
        currently only fixed in cobertura trunk -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <formats>
            <format>html</format>
            <format>xml</format>
          </formats>
          <check />
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javancss-maven-plugin</artifactId>
        <version>2.1</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
    </plugins>
  </reporting>
</project>
