<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<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>io.kestros.cms</groupId>
    <artifactId>kestros-cms-parent</artifactId>
    <version>0.0.2</version>
    <relativePath>../kestros-cms-parent</relativePath>
  </parent>

  <artifactId>kestros-cms-parent-strict</artifactId>

  <name>Kestros CMS Parent - Strict</name>
  <description></description>
  <packaging>pom</packaging>

  <dependencyManagement>

  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Mutation Testing -->
        <plugin>
          <groupId>org.pitest</groupId>
          <artifactId>pitest-maven</artifactId>
          <version>1.4.3</version>
        </plugin>
        <!-- Code Coverage Check -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.4</version>
          <executions>
            <execution>
              <id>default-prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>check</id>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <rules>
                  <rule>
                    <element>BUNDLE</element>
                    <limits>
                      <limit>
                        <counter>LINE</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>0.15</minimum>
                      </limit>
                      <limit>
                        <counter>BRANCH</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>0.15</minimum>
                      </limit>
                    </limits>
                  </rule>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>3.1.1</version>
          <inherited>true</inherited>
          <dependencies>
            <dependency>
              <groupId>io.kestros.commons</groupId>
              <artifactId>kestros-build-tools</artifactId>
              <version>0.2.1</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>validate</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <configLocation>checkstyle.xml</configLocation>
                <encoding>UTF-8</encoding>
                <consoleOutput>true</consoleOutput>
                <failsOnError>true</failsOnError>
                <failOnViolation>true</failOnViolation>
                <violationSeverity>warning</violationSeverity>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.5</version>
          <configuration>
            <effort>Max</effort>
            <threshold>Low</threshold>
            <xmlOutput>true</xmlOutput>
            <failOnError>true</failOnError>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.13</version>
          <configuration>
            <excludes>
              <!-- don't check anything in target -->
              <exclude>target/*</exclude>
              <!-- Fixing issues with deleted modules -->
              <exclude>**/target/*</exclude>
              <exclude>**/target/**/*</exclude>
              <exclude>**/*.iml</exclude>
              <exclude>node/**/*</exclude>
              <exclude>node_modules/**/*</exclude>
              <exclude>**/README.md</exclude>
              <exclude>package.json</exclude>
              <exclude>package-lock.json</exclude>
              <exclude>*-maven-settings.xml</exclude>
              <exclude>coverage/**/*</exclude>
              <exclude>.nyc_output/**/*</exclude>
              <exclude>.eslintrc.json</exclude>
              <exclude>.stylelintrc.json</exclude>
            </excludes>
          </configuration>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>mutationTest</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
            <version>1.4.3</version>
            <executions>
              <execution>
                <goals>
                  <goal>mutationCoverage</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <outputFormats>
                <outputFormat>XML</outputFormat>
                <outputFormat>HTML</outputFormat>
              </outputFormats>

              <mutators>
                <mutator>CONDITIONALS_BOUNDARY</mutator>
                <mutators>NEGATE_CONDITIONALS</mutators>
                <mutators>REMOVE_CONDITIONALS</mutators>
                <mutators>MATH</mutators>
                <mutators>INCREMENTS</mutators>
                <mutators>INVERT_NEGS</mutators>
                <mutators>INLINE_CONSTS</mutators>
                <mutators>RETURN_VALS</mutators>
                <mutators>VOID_METHOD_CALLS</mutators>
                <mutators>TRUE_RETURNS</mutators>
                <mutators>FALSE_RETURNS</mutators>
                <mutators>PRIMITIVE_RETURNS</mutators>
                <mutators>EMPTY_RETURNS</mutators>
                <mutators>NULL_RETURNS</mutators>
                <mutators>NON_VOID_METHOD_CALLS</mutators>
                <mutators>CONSTRUCTOR_CALLS</mutators>
                <mutators>EXPERIMENTAL_MEMBER_VARIABLE</mutators>
                <mutators>EXPERIMENTAL_SWITCH</mutators>
              </mutators>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
