<?xml version="1.0" encoding="UTF-8"?>
<!--
 The MIT License (MIT)

 Copyright (c) for portions of project cactoos-matchers are held by
 Yegor Bugayenko, 2017-2018, as part of project cactoos.
 All other copyright for project cactoos-matchers are held by
 George Aristy, 2018-2020.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included
 in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
-->
<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.jcabi</groupId>
    <artifactId>parent</artifactId>
    <version>0.50.5</version>
  </parent>
  <groupId>org.llorllale</groupId>
  <artifactId>cactoos-matchers</artifactId>
  <version>0.21</version>
  <packaging>jar</packaging>
  <name>cactoos-matchers</name>
  <description>Extension for cactoos providing object-oriented hamcrest matchers.</description>
  <url>https://github.com/llorllale/cactoos-matchers</url>
  <inceptionYear>2017</inceptionYear>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://www.cactoos.org/LICENSE.txt</url>
      <distribution>site</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>llorllale</id>
      <name>George Aristy</name>
      <email>george.aristy@gmail.com</email>
    </developer>
  </developers>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/llorllale/cactoos-matchers/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git@github.com:llorllale/cactoos-matchers.git</connection>
    <developerConnection>scm:git:git@github.com:llorllale/cactoos-matchers.git</developerConnection>
    <url>https://github.com/llorllale/cactoos-matchers</url>
  </scm>
  <ciManagement>
    <system>rultor</system>
    <url>http://www.rultor.com/p/llorllale/cactoos-matchers</url>
  </ciManagement>
  <dependencies>
    <dependency>
      <groupId>org.cactoos</groupId>
      <artifactId>cactoos</artifactId>
      <version>0.45</version>
    </dependency>
    <!--
     @todo #162:30min Migrate existing tests to JUnit 5. It mainly means
      changing the imports and move from Ignore to Disabled annotation as
      well as replace rules with corresponding annotations. Once this is done
      remove the dependency for junit 4 and junit-vintage-engine below.
    -->
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>1.3</version>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>qulice</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-maven-plugin</artifactId>
            <version>0.18.19</version>
          </plugin>
          <plugin>
            <groupId>de.thetaphi</groupId>
            <artifactId>forbiddenapis</artifactId>
            <version>2.6</version>
            <configuration>
              <signaturesFiles>
                <signaturesFile>src/test/resources/forbidden-apis.txt</signaturesFile>
              </signaturesFiles>
              <excludes>
                <exclude>org/llorllale/cactoos/matchers/AssertionTest.class</exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>testCheck</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonar</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>sonar-maven-plugin</artifactId>
            <version>3.4.0.905</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>sonar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <!--
             @todo #159:30min This plugin execution was disabled
              (phase was set to `package` before) because it prevents
              cactoos from actually using cactoos-matchers since the
              interfaces provided by cactoos (`Text`, `Func`, `Scalar`, etc)
              and those expected by cactoos-matchers do no match!
              Let's find a solution to this situation (not shading the
              interfaces for example?) and re-enable this plugin. The best
              solution should be discussed with ARC in this todo's ticket.
            -->
            <phase>ignore</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <!-- This confuses qulice -->
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <createSourcesJar>true</createSourcesJar>
              <shadeSourcesContent>true</shadeSourcesContent>
              <artifactSet>
                <includes>
                  <include>org.cactoos:cactoos</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.cactoos</pattern>
                  <shadedPattern>
                    org.llorllale.cactoos.shaded.org.cactoos
                  </shadedPattern>
                </relocation>
              </relocations>
              <minimizeJar>true</minimizeJar>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <configuration>
          <output>file</output>
          <outputDirectory>${project.build.directory}/coverage</outputDirectory>
        </configuration>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-check</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
              <goal>report</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>INSTRUCTION</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.61</minimum>
                    </limit>
                    <limit>
                      <counter>LINE</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.65</minimum>
                    </limit>
                    <limit>
                      <counter>BRANCH</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.65</minimum>
                    </limit>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.57</minimum>
                    </limit>
                    <limit>
                      <counter>METHOD</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.57</minimum>
                    </limit>
                    <limit>
                      <counter>CLASS</counter>
                      <value>MISSEDCOUNT</value>
                      <maximum>15</maximum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
