<?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>org.apache.uima</groupId>
    <artifactId>parent-pom</artifactId>
    <relativePath />
    <version>16</version>
  </parent>
  <artifactId>uimafit-parent</artifactId>
  <version>3.4.0</version>
  <packaging>pom</packaging>
  <name>Apache UIMA uimaFIT - Parent</name>
  <url>${uimaWebsiteUrl}</url>
  <inceptionYear>2012</inceptionYear>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/apache/uima-uimafit/issues</url>
  </issueManagement>
  
  <scm>
    <tag>uimafit-3.4.0</tag>
    <connection>scm:git:git://github.com/apache/uima-uimafit</connection>
    <developerConnection>scm:git:git@github.com:apache/uima-uimafit.git</developerConnection>
    <url>https://github.com/apache/uima-uimafit</url>
  </scm>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <api_check_oldVersion>3.3.0</api_check_oldVersion>

    <assertj-version>3.22.0</assertj-version>
    <commons-io-version>2.11.0</commons-io-version>
    <commons-lang3-version>3.12.0</commons-lang3-version>
    <junit-version>5.8.2</junit-version>
    <groovy-version>3.0.10</groovy-version>
    <mockito-version>4.4.0</mockito-version>
    <spring-version>5.3.25</spring-version>
    <slf4j-version>1.7.36</slf4j-version>
    <uima-version>3.4.0</uima-version>
    <xmlunit-version>2.9.0</xmlunit-version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-migrationsupport</artifactId>
        <version>${junit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>${junit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj-version}</version>
      </dependency>
      <dependency>
        <groupId>org.xmlunit</groupId>
        <artifactId>xmlunit-core</artifactId>
        <version>${xmlunit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.xmlunit</groupId>
        <artifactId>xmlunit-assertj3</artifactId>
        <version>${xmlunit-version}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3-version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io-version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.uima</groupId>
        <artifactId>uimaj-core</artifactId>
        <version>${uima-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.uima</groupId>
        <artifactId>uimaj-cpe</artifactId>
        <version>${uima-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.uima</groupId>
        <artifactId>uimaj-tools</artifactId>
        <version>${uima-version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring-version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring-version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring-version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring-version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <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>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-toolchains-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>toolchain</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <toolchains>
            <jdk>
              <version>${maven.compiler.target}</version>
            </jdk>
          </toolchains>
        </configuration>
      </plugin>
      <plugin>
        <!-- See: https://issues.apache.org/jira/browse/UIMA-6351 -->
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
        <version>0.15.7</version>
        <configuration>
          <newVersion>
            <file>
              <path>${project.build.directory}/${project.build.finalName}.jar</path>
            </file>
          </newVersion>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-jsr223</artifactId>
            <version>${groovy-version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>default</id>
            <phase>verify</phase>
            <goals>
              <goal>analyze-only</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failOnWarning>true</failOnWarning>
          <ignoredDependencies combine.children="append">
            <ignoredDependency>org.assertj:assertj-core</ignoredDependency>
            <ignoredDependency>org.slf4j:slf4j-simple</ignoredDependency>
            <ignoredDependency>org.junit.jupiter:junit-jupiter-api</ignoredDependency>
            <ignoredDependency>org.junit.jupiter:junit-jupiter-engine</ignoredDependency>
            <!-- 
              - Logging is used via reflection and cannot be detected by Maven
            -->
            <ignoredDependency>org.slf4j:slf4j-simple</ignoredDependency>
          </ignoredDependencies>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>groovy-maven-plugin</artifactId>
        <version>2.1.1</version>
        <executions>
          <execution>
            <!-- Load postNoticeText from NOTICE file -->
            <id>read-notice</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <source><![CDATA[
                def noticeFile = new File(project.basedir.path + "/NOTICE");
                if (noticeFile.exists()) {
                  project.properties.postNoticeText = noticeFile.text;
                  println "Loaded NOTICE file content into property [postNoticeText]"
                } else {
                  println "No NOTICE file was found - content not loaded into property [postNoticeText]"
                }
              ]]></source>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy-version}</version>
            <type>pom</type>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <!-- 
          Normally this only gets executed during releases, but we want licenses to be checked on
          every build to make sure the licenses are included in the PRs.
         -->
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.13</version>
          <executions>
            <execution>
              <id>default-cli</id>
              <configuration>
                <consoleOutput>true</consoleOutput>
                <excludes combine.children="append">
                  <!-- Plain documentation -->
                  <exclude>README*</exclude>
                  <!-- Eclipse config files -->
                  <exclude>uimafit-docbook/.settings/**</exclude>
                  <exclude>uimafit-docbook/.project</exclude>
                  <!-- GitHub templates -->
                  <exclude>.github/**</exclude>
                  <!-- Release files -->
                  <exclude>RELEASE_NOTES*</exclude>
                  <exclude>issuesFixed/**</exclude>
                  <exclude>release.properties</exclude>
                  <!-- Build controls -->
                  <exclude>.activate-enforce-compatibility</exclude>
                  <!-- Logging configuration files -->
                  <exclude>**/simplelogger.properties</exclude>
                </excludes>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <!-- https://issues.apache.org/jira/browse/RAT-158 -->
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-core</artifactId>
              <version>1.11.1</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.10.1</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
            <!--encoding>UTF-8</encoding this inherited from apache pom 7 -->
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.3.2</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <configuration>
                <source>${maven.compiler.source}</source>
              </configuration>
            </execution>
            <execution>
              <id>default-cli</id>  <!-- Jenkins runs this apparently 3/2015 -->
              <configuration>
                <source>${maven.compiler.source}</source>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.uima</groupId>
          <artifactId>jcasgen-maven-plugin</artifactId>
          <version>${uima-version}</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings
          only. It has no influence on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>groovy-maven-plugin</artifactId>
                    <versionRange>[1.4,)</versionRange>
                    <goals>
                      <goal>execute</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>spotbugs</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs-maven-plugin</artifactId>
              <version>4.7.0.0</version>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>