<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>org.reaktivity</groupId>
  <artifactId>nukleus-http-cache.spec</artifactId>
  <version>0.21</version>
  <name>HTTP Cache Nukleus Specification</name>
  <description>HTTP Cache Nukleus Specification</description>
  <url>https://github.com/reaktivity/nukleus-http-cache.spec</url>

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

  <developers>
    <developer>
      <id>reaktivity.org</id>
      <name>The Reaktivity Project Contributors</name>
      <url>http://reaktivity.org/</url>
      <organization>The Reaktivity Project</organization>
      <organizationUrl>http://reaktivity.org/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/reaktivity/nukleus-http-cache.spec</connection>
    <developerConnection>scm:git:https://github.com/reaktivity/nukleus-http-cache.spec</developerConnection>
    <url>https://github.com/reaktivity/nukleus-http-cache.spec</url>
  </scm>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <checkstyle.config.location>src/conf/checkstyle/configuration.xml</checkstyle.config.location>
    <checkstyle.suppressions.location>src/conf/checkstyle/suppressions.xml</checkstyle.suppressions.location>
    <jacoco.coverage.ratio>0</jacoco.coverage.ratio>
    <jacoco.missed.count>3</jacoco.missed.count>

    <junit.version>4.12</junit.version>

    <k3po.version>3.0.0-alpha-84</k3po.version>
    <k3po.nukleus.ext.version>0.12</k3po.nukleus.ext.version>

    <nukleus-http2.spec.version>0.29</nukleus-http2.spec.version>
    <nukleus.plugin.version>0.13</nukleus.plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
    </dependency>
    <dependency>
      <groupId>org.kaazing</groupId>
      <artifactId>k3po.junit</artifactId>
      <version>${k3po.version}</version>
    </dependency>
    <dependency>
      <groupId>org.kaazing</groupId>
      <artifactId>k3po.lang</artifactId>
      <version>${k3po.version}</version>
    </dependency>
    <dependency>
      <groupId>org.reaktivity</groupId>
      <artifactId>nukleus-http2.spec</artifactId>
      <version>${nukleus-http2.spec.version}</version>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/scripts</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <header>COPYRIGHT</header>
          <properties>
            <copyrightYears>2016-2017</copyrightYears>
          </properties>
          <includes>
            <include>src/**</include>
          </includes>
          <excludes>
            <exclude>src/conf/**</exclude>
          </excludes>
          <mapping>
            <rpt>SCRIPT_STYLE</rpt>
          </mapping>
          <failIfUnknown>true</failIfUnknown>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.9</version>
        <configuration>
          <rules>
            <rule>
              <element>BUNDLE</element>
              <limits>
                <limit>
                  <counter>INSTRUCTION</counter>
                  <value>COVEREDRATIO</value>
                  <minimum>${jacoco.coverage.ratio}</minimum>
                </limit>
                <limit>
                  <counter>CLASS</counter>
                  <value>MISSEDCOUNT</value>
                  <maximum>${jacoco.missed.count}</maximum>
                </limit>
              </limits>
            </rule>
          </rules>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <argLine>@{argLine}</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.kaazing</groupId>
        <artifactId>k3po-maven-plugin</artifactId>
        <version>${k3po.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>start</goal>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.reaktivity</groupId>
            <artifactId>k3po-nukleus-ext</artifactId>
            <version>${k3po.nukleus.ext.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <argLine>@{argLine}</argLine>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>

      <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>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots</id>
                <phase>validate</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>No Snapshots Allowed!</message>
                    </requireReleaseDeps>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>

