<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.dkpro</groupId>
    <artifactId>dkpro-parent-pom</artifactId>
    <version>36</version>
  </parent>

  <groupId>org.dkpro.statistics</groupId>
  <artifactId>dkpro-statistics</artifactId>
  <version>2.3.1</version>
  <packaging>pom</packaging>

  <name>DKPro Statistics</name>
  <url>https://dkpro.github.io/dkpro-statistics/</url>
  <description>DKPro Statistics is a collection of open-licensed statistical
    tools, currently including inter-rater agreement, correlation, and
    significance measures.</description>

  <organization>
    <name>Ubiquitous Knowledge Processing (UKP) Lab</name>
    <url>https://www.ukp.tu-darmstadt.de/</url>
  </organization>

  <developers>
    <developer>
      <id>reckart</id>
      <name>Richard Eckart de Castilho</name>
    </developer>
    <developer>
      <id>chmeyer.de</id>
      <name>Christian M. Meyer</name>
      <email>chmeyer.de@gmail.com</email>
    </developer>
    <developer>
      <id>ChristianStab</id>
      <name>Christian Stab</name>
      <email>zemes@gmx.de</email>
    </developer>
    <developer>
      <id>RolandKluge</id>
      <name>Roland Kluge</name>
      <email>mail@roland-kluge.de</email>
    </developer>
  </developers>

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

  <properties>
    <maven.compiler.release>21</maven.compiler.release>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <configuration>
          <rulesUri>file:${maven.multiModuleProjectDirectory}/dkpro-statistics-build/src/main/resources/dkpro-statistics/rules.xml</rulesUri>
          <allowAnyUpdates>false</allowAnyUpdates>
          <allowMajorUpdates>false</allowMajorUpdates>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.rudikershaw.gitbuildhook</groupId>
        <artifactId>git-build-hook-maven-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <gitConfig>
            <core.hooksPath>.githooks</core.hooksPath>
          </gitConfig>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>configure</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <modules>
    <module>dkpro-statistics-build</module>
    <module>dkpro-statistics-agreement</module>
    <module>dkpro-statistics-correlation</module>
    <module>dkpro-statistics-significance</module>
  </modules>

  <scm>
    <connection>scm:git:https://github.com/dkpro/dkpro-statistics.git</connection>
    <developerConnection>scm:git:https://github.com/dkpro/dkpro-statistics.git</developerConnection>
    <url>https://github.com/dkpro/dkpro-statistics</url>
    <tag>dkpro-statistics-2.3.1</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-math3</artifactId>
        <version>3.6.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.20.0</version>
      </dependency>
      <dependency>
        <groupId>org.ojalgo</groupId>
        <artifactId>ojalgo</artifactId>
        <version>57.0.0</version>
      </dependency>
      <dependency>
        <groupId>tools.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>3.2.1</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.27.7</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>6.1.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-bom</artifactId>
        <version>2.0.18</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>rat-check</id>
      <activation>
        <file>
          <exists>src/main/java</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
            <executions>
              <execution>
                <id>default</id>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>.gitignore</exclude>
                    <exclude>.checkstyle</exclude>
                    <exclude>suppressions.xml</exclude>
                    <!-- release generated artifact -->
                    <exclude>release.properties</exclude>
                    <exclude>CHANGES.txt</exclude>
                    <exclude>NOTICE.txt</exclude>
                    <exclude>README.txt</exclude>
                    <exclude>src/main/resources/**/*</exclude>
                    <exclude>src/test/resources/**/*</exclude>
                  </excludes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>checkstyle</id>
      <activation>
        <file>
          <exists>src</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
          </plugin>
        </plugins>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-checkstyle-plugin</artifactId>
              <version>3.6.0</version>
              <inherited>true</inherited>
              <dependencies>
                <dependency>
                  <groupId>org.dkpro.statistics</groupId>
                  <artifactId>dkpro-statistics-build</artifactId>
                  <version>${project.version}</version>
                </dependency>
                <dependency>
                  <groupId>com.puppycrawl.tools</groupId>
                  <artifactId>checkstyle</artifactId>
                  <version>10.26.1</version>
                </dependency>
              </dependencies>
              <configuration>
                <configLocation>dkpro-statistics/checkstyle.xml</configLocation>
                <!-- See:
                https://github.com/m2e-code-quality/m2e-code-quality/issues/117#issuecomment-380022879 -->
                <sourceDirectories>${project.compileSourceRoots}</sourceDirectories>
                <testSourceDirectories>${project.testCompileSourceRoots}</testSourceDirectories>
                <propertyExpansion>basedir=${project.basedir}</propertyExpansion>
                <consoleOutput>true</consoleOutput>
                <failOnViolation>true</failOnViolation>
                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                <includeResources>false</includeResources>
                <includeTestResources>false</includeTestResources>
                <logViolationsToConsole>true</logViolationsToConsole>
                <maxAllowedViolations>0</maxAllowedViolations>
                <violationSeverity>error</violationSeverity>
              </configuration>
              <executions>
                <execution>
                  <id>checkstyle-check</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>check</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>spotless</id>
      <activation>
        <property>
          <name>!m2e.version</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
          </plugin>
        </plugins>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>com.diffplug.spotless</groupId>
              <artifactId>spotless-maven-plugin</artifactId>
              <version>3.8.0</version>
              <inherited>true</inherited>
              <configuration>
                <java>
                  <eclipse>
                    <version>4.39</version>
                    <file>${maven.multiModuleProjectDirectory}/dkpro-statistics-build/src/main/resources/dkpro-statistics/DKProStyle_latest.xml</file>
                  </eclipse>
                  <removeUnusedImports />
                  <endWithNewline />
                </java>
              </configuration>
              <executions>
                <execution>
                  <id>spotless-check</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>check</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>
