<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.jxen.sdk</groupId>
  <artifactId>jxen-parent</artifactId>
  <version>4</version>
  <packaging>pom</packaging>
  <url>https://github.com/jxen/jxen-sdk</url>
  <name>Java Xenon SDK Parent</name>
  <description>Java Xenon Project Software Development Kit Parent</description>
  <licenses>
    <license>
      <name>Apache License Version 2.0, January 2004</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Denis Murashev</name>
      <email>murashev@mail.ru</email>
    </developer>
  </developers>
  <organization>
    <name>Java Xenon Project</name>
    <url>https://github.com/jxen</url>
  </organization>
  <properties>
    <java.version>11</java.version>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <coverage>0.75</coverage>

    <junit.version>5.8.2</junit.version>
    <log4j.version>2.17.0</log4j.version>

    <groovy.version>3.0.9</groovy.version>
    <gmavenplus.version>1.13.1</gmavenplus.version>

    <checkstyle-plugin.version>3.1.2</checkstyle-plugin.version>
    <deploy-plugin.version>3.0.0-M1</deploy-plugin.version>
    <jacoco-plugin.version>0.8.7</jacoco-plugin.version>
    <jar-plugin.version>3.2.0</jar-plugin.version>
    <javadoc-plugin.version>3.3.1</javadoc-plugin.version>
    <pmd-plugin.version>3.14.0</pmd-plugin.version>
    <site-plugin.version>3.9.1</site-plugin.version>
    <source-plugin.version>3.2.1</source-plugin.version>
    <spotbugs-plugin.version>4.2.3</spotbugs-plugin.version>
    <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>

    <checkstyle.version>9.2</checkstyle.version>
    <jxen-resources.version>3</jxen-resources.version>

    <jdepend-plugin.version>2.0</jdepend-plugin.version>
    <jrx-plugin.version>3.1.1</jrx-plugin.version>
    <project-info-reports-plugin.version>3.1.2</project-info-reports-plugin.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>${log4j.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${deploy-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <useFile>true</useFile>
          <parallel>methods</parallel>
          <threadCount>10</threadCount>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <configuration>
          <targetJdk>${java.version}</targetJdk>
          <rulesets>
            <ruleset>java/pmd.xml</ruleset>
          </rulesets>
          <printFailingErrors>true</printFailingErrors>
          <minimumTokens>100</minimumTokens>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
              <goal>cpd-check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.github.jxen.sdk</groupId>
            <artifactId>jxen-resources</artifactId>
            <version>${jxen-resources.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <effort>Max</effort>
          <threshold>Low</threshold>
          <failOnError>true</failOnError>
        </configuration>
        <executions>
          <execution>
            <id>analyze-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <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>${coverage}</minimum>
                    </limit>
                    <limit>
                      <counter>BRANCH</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>${coverage}</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadoc-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${jar-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${pmd-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${site-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>groovy</id>
      <activation>
        <file>
          <exists>${basedir}/src/main/groovy</exists>
        </file>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy</artifactId>
          <version>${groovy.version}</version>
          <classifier>indy</classifier>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmavenplus</groupId>
            <artifactId>gmavenplus-plugin</artifactId>
            <version>${gmavenplus.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>addSources</goal>
                  <goal>addTestSources</goal>
                  <goal>generateStubs</goal>
                  <goal>compile</goal>
                  <goal>generateTestStubs</goal>
                  <goal>compileTests</goal>
                  <goal>removeStubs</goal>
                  <goal>removeTestStubs</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <invokeDynamic>true</invokeDynamic>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>java</id>
      <activation>
        <file>
          <exists>${basedir}/src/main/java</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${checkstyle-plugin.version}</version>
            <configuration>
              <configLocation>java/checkstyle.xml</configLocation>
            </configuration>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>com.puppycrawl.tools</groupId>
                <artifactId>checkstyle</artifactId>
                <version>${checkstyle.version}</version>
              </dependency>
              <dependency>
                <groupId>com.github.jxen.sdk</groupId>
                <artifactId>jxen-resources</artifactId>
                <version>${jxen-resources.version}</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>javadoc</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>${jdepend-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <id>default</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${jrx-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${project-info-reports-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire-plugin.version}</version>
      </plugin>
    </plugins>
  </reporting>
  <distributionManagement>
    <repository>
      <id>nexus</id>
      <name>Nexus Releases Repository</name>
      <url>${nexus-releases}</url>
    </repository>
    <snapshotRepository>
      <id>nexus</id>
      <name>Nexus Snapshots Repository</name>
      <url>${nexus-snapshots}</url>
    </snapshotRepository>
  </distributionManagement>
</project>
