<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>pl.jalokim.parentpom</groupId>
  <artifactId>root-parent-pom</artifactId>
  <version>1.0.3</version>
  <packaging>pom</packaging>
  <name>${release.project.name}</name>
  <description>${release.project.description}</description>
  <url>https://${release.project.repository-url}</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Mikołaj Mitura</name>
      <email>mitura.mikolaj@gmail.com</email>
      <organizationUrl>https://${release.project.repository-url}</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://${release.project.repository-url}.git</connection>
    <developerConnection>scm:git:ssh://${release.project.repository-url}.git</developerConnection>
    <url>https://${release.project.repository-url}</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <javafaker.version>1.0.2</javafaker.version>
    <minor-version>3</minor-version>
    <maven.java.version>${java.version}</maven.java.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <codenarc.version>2.1.0</codenarc.version>
    <checkstyle.location>${code-style.base-dir}/checkstyle/checkstyle.xml</checkstyle.location>
    <plugin.git-commit-id.version>4.0.0</plugin.git-commit-id.version>
    <plugin.flatten.version>1.2.2</plugin.flatten.version>
    <checkstyle.suppressions.location>${code-style.base-dir}/checkstyle/suppressions.xml</checkstyle.suppressions.location>
    <commons-collections4.version>4.4</commons-collections4.version>
    <gmavenplus-plugin.version>1.12.1</gmavenplus-plugin.version>
    <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
    <plugin.surefire.version>2.22.2</plugin.surefire.version>
    <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
    <maven-pmd-plugin.version>3.11.0</maven-pmd-plugin.version>
    <org.assertj.version>3.13.2</org.assertj.version>
    <coverage.exluded.classes>**/*Main.class</coverage.exluded.classes>
    <spotbugs.exclude.location>${code-style.base-dir}/spotbugs/spotbugs-exclude.xml</spotbugs.exclude.location>
    <plugin.spotbugs.version>4.0.0</plugin.spotbugs.version>
    <coverage.module.minimum>0.0</coverage.module.minimum>
    <commons-io.version>2.6</commons-io.version>
    <cglib-nodep.version>3.2.9</cglib-nodep.version>
    <objenesis.version>2.6</objenesis.version>
    <release.project.repository-url>${release.project.repo-owner}/${release.project.repository-name}</release.project.repository-url>
    <java.version>11</java.version>
    <mockito.version>3.0.0</mockito.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <lombok.version>1.18.12</lombok.version>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <findbugs.version>3.0.0</findbugs.version>
    <pmd.version>6.36.0</pmd.version>
    <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
    <maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
    <main-version>1.0</main-version>
    <junit.version>4.13.2</junit.version>
    <groovy.version>2.5.8</groovy.version>
    <plugin.scm.version>1.11.2</plugin.scm.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <plugin.checkstyle.version>3.1.1</plugin.checkstyle.version>
    <code-style.base-dir>${project.basedir}/src/main/resources</code-style.base-dir>
    <plugin.remote.resources.version>1.7.0</plugin.remote.resources.version>
    <commons-lang.version>3.10</commons-lang.version>
    <spock.version>1.3-groovy-2.5</spock.version>
    <release.project.repo-owner>github.com/mikolajmitura/</release.project.repo-owner>
    <release.project.repository-name>java-parent-pom</release.project.repository-name>
    <release.project.name>java root parent pom</release.project.name>
    <release.project.description>root parent pom for releases libs, verify code style and configuration for tests</release.project.description>
    <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
    <coveralls.repo.token>example token</coveralls.repo.token>
    <nexus-staging-maven-plugin.autoReleaseAfterClose>true</nexus-staging-maven-plugin.autoReleaseAfterClose>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <pmd.location>${code-style.base-dir}/pmd/pmd.xml</pmd.location>
    <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
    <plugin.arch-unit.version>2.4.0</plugin.arch-unit.version>
    <codenarc.location>${code-style.base-dir}/codenarc/codenarc.xml</codenarc.location>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.javafaker</groupId>
        <artifactId>javafaker</artifactId>
        <version>${javafaker.version}</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${org.assertj.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>${groovy.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib-nodep</artifactId>
        <version>${cglib-nodep.version}</version>
      </dependency>
      <dependency>
        <groupId>org.objenesis</groupId>
        <artifactId>objenesis</artifactId>
        <version>${objenesis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.spockframework</groupId>
        <artifactId>spock-core</artifactId>
        <version>${spock.version}</version>
      </dependency>
      <dependency>
        <groupId>org.spockframework</groupId>
        <artifactId>spock-spring</artifactId>
        <version>${spock.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-datetime</artifactId>
        <version>${groovy.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
      <version>${commons-collections4.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${commons-lang.version}</version>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
      <version>${plugin.spotbugs.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <version>${findbugs.version}</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${plugin.checkstyle.version}</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <configLocation>${checkstyle.location}</configLocation>
          <suppressionsLocation>${checkstyle.suppressions.location}</suppressionsLocation>
          <encoding>${project.build.sourceEncoding}</encoding>
          <consoleOutput>true</consoleOutput>
          <sourceDirectories>
            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
          </sourceDirectories>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven-pmd-plugin.version}</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>net.sourceforge.pmd</groupId>
            <artifactId>pmd-core</artifactId>
            <version>${pmd.version}</version>
          </dependency>
          <dependency>
            <groupId>net.sourceforge.pmd</groupId>
            <artifactId>pmd-java</artifactId>
            <version>${pmd.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <linkXRef>false</linkXRef>
          <targetJdk>${maven.compiler.target}</targetJdk>
          <printFailingErrors>true</printFailingErrors>
          <excludeRoots>
            <excludeRoot>target/generated-sources/groovy-stubs</excludeRoot>
          </excludeRoots>
          <excludes>
            <exclude>**/*MapperImpl.java</exclude>
          </excludes>
          <rulesets>
            <ruleset>${pmd.location}</ruleset>
          </rulesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${plugin.spotbugs.version}</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludeFilterFile>${spotbugs.exclude.location}</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>${maven-antrun-plugin.version}</version>
        <executions>
          <execution>
            <id>codeNarcTask</id>
            <phase>process-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target name="runCodeNarc">
                <taskdef classname="org.codenarc.ant.CodeNarcTask" name="codenarc" />
                <property name="antCodenarcLocation" value="${codenarc.location}" />
                <property name="buildDir" value="${project.build.directory}" />
                <codenarc ruleSetFiles="file:///${antCodenarcLocation}" maxPriority1Violations="0" maxPriority2Violations="0" maxPriority3Violations="0">
                  <report type="html">
                    <option name="outputFile" value="${buildDir}/CodeNarc.html" />
                  </report>
                  <report type="xml">
                    <option name="outputFile" value="${buildDir}/CodeNarc.xml" />
                  </report>
                  <fileset dir="src" erroronmissingdir="false">
                    <include name="**/*.groovy" />
                  </fileset>
                </codenarc>
              </target>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codenarc</groupId>
            <artifactId>CodeNarc</artifactId>
            <version>${codenarc.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>${plugin.flatten.version}</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-scm-plugin</artifactId>
        <version>${plugin.scm.version}</version>
        <configuration>
          <tag>${project.artifactId}-${project.version}</tag>
        </configuration>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>${plugin.git-commit-id.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbose>true</verbose>
          <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
          <generateGitPropertiesFile>true</generateGitPropertiesFile>
          <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>${gmavenplus-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compileTests</goal>
              <goal>addTestSources</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy.version}</version>
            <type>pom</type>
            <scope>runtime</scope>
          </dependency>
        </dependencies>
        <configuration>
          <sourceEncoding>UTF-8</sourceEncoding>
          <testSources>
            <testSource>
              <directory>${project.basedir}/src/test/groovy</directory>
              <includes>
                <include>**/*.groovy</include>
              </includes>
            </testSource>
            <testSource>
              <directory>${project.basedir}/target/generated-test-sources/</directory>
              <includes>
                <include>**/*.groovy</include>
              </includes>
            </testSource>
          </testSources>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${plugin.surefire.version}</version>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
            <include>**/*Spec.java</include>
            <include>**/*IT.java</include>
          </includes>
          <failIfNoTests>false</failIfNoTests>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>checkstyle.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
  <profiles>
    <profile>
      <id>by-jdk8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <source>${java.version}</source>
              <target>${java.version}</target>
              <encoding>${project.build.sourceEncoding}</encoding>
              <compilerArgs>
                <arg>-parameters</arg>
              </compilerArgs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>by-jdk11</id>
      <activation>
        <jdk>11</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
            <configuration>
              <release>11</release>
              <encoding>UTF-8</encoding>
              <compilerArgs>
                <arg>-parameters</arg>
              </compilerArgs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>skip-code-review</id>
      <activation />
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${plugin.checkstyle.version}</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>${maven-pmd-plugin.version}</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>com.societegenerale.commons</groupId>
            <artifactId>arch-unit-maven-plugin</artifactId>
            <version>2.4.0</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <version>${plugin.spotbugs.version}</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>${maven-antrun-plugin.version}</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>skipTests</id>
      <activation>
        <property>
          <name>skipTests</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${plugin.surefire.version}</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.5</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>jacoco-prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>check</id>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>${coverage.exluded.classes}</exclude>
                  </excludes>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <limits>
                        <limit>
                          <counter>INSTRUCTION</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>${coverage.module.minimum}</minimum>
                        </limit>
                        <limit>
                          <counter>BRANCH</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>${coverage.module.minimum}</minimum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
            <version>4.3.0</version>
            <configuration>
              <repoToken>${coveralls.repo.token}</repoToken>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <activation />
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.7</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>injected-nexus-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <serverId>ossrh</serverId>
                  <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                  <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <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>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
