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

<!-- This pom serves as the release top level project,
     and for users wanting to build all of the
     base UIMA Java SDK
 -->

<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.apache.uima</groupId>
    <artifactId>uimaj-parent-internal</artifactId>
    <version>3.6.1</version>
    <relativePath>uimaj-parent-internal/pom.xml</relativePath>
  </parent>

  <artifactId>uimaj</artifactId>
  <packaging>pom</packaging>
  <name>Apache UIMA Java SDK: ${project.artifactId}</name>
  <description>The top project for the UIMA Java SDK</description>
  <url>${uimaWebsiteUrl}</url>

  <scm>
    <connection>scm:git:https://github.com/apache/uima-uimaj/</connection>
    <developerConnection>scm:git:https://github.com/apache/uima-uimaj/</developerConnection>
    <url>https://github.com/apache/uima-uimaj/</url>
    <tag>uimaj-3.6.1</tag>
  </scm>

  <properties>
    <assemblyBinDescriptor>src/main/assembly/bin-without-jackson.xml</assemblyBinDescriptor> 
    <postNoticeText>${ibmNoticeText}</postNoticeText>    
  </properties>

  <modules>
    <module>uimaj-parent</module>
    <module>uimaj-bom</module>
    <module>uimaj-parent-internal</module>
    <module>aggregate-uimaj</module>
  </modules>
  
  <!-- The dependencies here are required for the binary distribution assembly! -->
  <dependencies>
    <dependency>
      <groupId>org.apache.uima</groupId> 
      <artifactId>uimaj-adapter-vinci</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId> 
      <artifactId>uimaj-bootstrap</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-cpe</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-document-annotation</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-examples</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-json</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-tools</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimafit-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimafit-cpe</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-cas-editor</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-configurator</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-debug</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-jcasgen</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-pear-packager</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-runtime</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-cas-editor-ide</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-ep-launcher</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- BEGIN: uimaj-v3migration-jcas -->
    <!-- These can be removed when we remove the migration module -->
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>uimaj-v3migration-jcas</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.bitbucket.mstrobel</groupId>
      <artifactId>procyon-core</artifactId>
      <version>0.5.32</version>
    </dependency>
    <dependency>
      <groupId>org.bitbucket.mstrobel</groupId>
      <artifactId>procyon-compilertools</artifactId>
      <version>0.5.32</version>
    </dependency>
    <dependency>    <!-- apache v2 license  2016 checked -->
      <groupId>com.github.javaparser</groupId>
      <artifactId>javaparser-core</artifactId>
      <version>3.2.2</version>
    </dependency>
    <!-- END: uimaj-v3migration-jcas -->

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency> 
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
    </dependency>
       
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
    </dependency>
    
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-expression</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jcl</artifactId>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <!-- This JavaDoc config is for building the ones distributed with the bin packaging, and also 
           posted on our website.  It is not a complete JavaDoc - it only has user-level API info.
        
           There is another JavaDoc config in the parent POM that builds all the java docs - intended
           for use by developers (currently not used) 
           
           There is also a JavaDoc config for each individual Maven Jar artifact -->
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>javadocs-distr</id> <!-- name should match one in parent-pom --> 
            <phase>prepare-package</phase>  <!-- must come before package which uses the results -->
            <!--phase>deploy</phase--> <!-- comment above and uncomment to disable javadocs, for testing/experimentation, with assembly:assembly-->
            <goals>
              <goal>aggregate-no-fork</goal>
            </goals>
            <inherited>false</inherited>
            <configuration>
              <groups>
                <group>
                  <title>Core</title>
                  <packages>
                    org.apache.uima:org.apache.uima.analysis_component:org.apache.uima.analysis_engine*:org.apache.uima.cas:org.apache.uima.cas_data*:org.apache.uima.cas.*:org.apache.uima.collection*:org.apache.uima.flow*:org.apache.uima.impl*:org.apache.uima.jcas*:org.apache.uima.resource*:org.apache.uima.search*:org.apache.uima.spi*:org.apache.uima.uimacpp*:org.apache.uima.util*
                  </packages>
                </group>
                <group>
                  <title>uimaFIT</title>
                  <packages>
                    org.apache.uima.fit.component*:org.apache.uima.fit.descriptor*:org.apache.uima.fit.factory*:org.apache.uima.fit.pipeline*:org.apache.uima.fit.util*:org.apache.uima.fit.validation
                  </packages>
                </group>
                <group>
                  <title>CPE</title>
                  <packages>
                    org.apache.uima.fit.cpe*:org.apache.uima.collection.impl*
                  </packages>
                </group>
                <group>
                  <title>IO</title>
                  <packages>
                    org.apache.uima.json
                  </packages>
                </group>
                <group>
                  <title>PEAR</title>
                  <packages>
                    org.apache.uima.pear:org.apache.uima.pear.*
                  </packages>
                </group>
                <group>
                  <title>Spring</title>
                  <packages>
                    org.apache.uima.fit.spring:org.apache.uima.fit.spring.*
                  </packages>
                </group>
                <group>
                  <title>Tools</title>
                  <packages>
                    org.apache.uima.tools:org.apache.uima.tools.*:org.apache.uima.jcas.jcasgenp:org.apache.uima.bootstrap:org.apache.uima.migratev3.jcas
                  </packages>
                </group>
                <group>
                  <title>Testing</title>
                  <packages>
                    org.apache.uima.test*:org.apache.uima.fit.testing.*:org.apache.uima.fit.benchmark
                  </packages>
                </group>
                <group>
                  <title>Examples</title>
                  <packages>
                    org.apache.uima.examples:org.apache.uima.fit.examples.*
                  </packages>
                </group>
                <group>
                  <title>Internal</title>
                  <packages>
                    *.type:*.internal:*.internal.*:*.impl.*:org.apache.vinci.*:org.apache.uima.adapter.vinci*:org.apache.uima.PearPackagingMavenPlugin:org.apache.uima.fit.maven:org.apache.uima.fit.maven.*:org.apache.uima.it.*:org.apache.uima.taeconfigurator:org.apache.uima.taeconfigurator.*:org.apache.uima.ep*:org.apache.uima.caseditor:org.apache.uima.caseditor.*:org.apache.uima.analysis_engine.service.impl:org.apache.uima.analysis_engine.metadata.impl:org.apache.uima.analysis_engine.impl:org.apache.uima.analysis_engine.asb.impl:org.apache.uima.analysis_engine.asb:org.apache.uima.cas_data.impl:org.apache.uima.impl:org.apache.uima.flow.impl:org.apache.uima.jcas.impl:org.apache.uima.cas.impl:org.apache.uima.util.impl:org.apache.uima.cas_data.impl.vinci:org.apache.uima.analysis_engine.impl.compatibility:org.apache.uima.jcasgen_maven_plugin:org.apache.uima.search.impl:org.apache.uima.resource.impl:org.apache.uima.uimacpp:org.apache.uima.resource.metadata.impl:org.apache.uima.resource.service.impl:org.apache.uima.fit.internal:org.apache.uima.fit.internal.*:org.apache.uima.internal.*:org.apache.uima.json.impl
                  </packages>
                </group>
              </groups>
              <doctitle>Apache UIMA Java SDK ${project.version} User-Level API Documentation</doctitle>
              <windowtitle>Apache UIMA Java SDK ${project.version} User-Level API Documentation</windowtitle>
            </configuration>
          </execution>
        </executions>
      </plugin>
    
      <plugin> 
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>uima-distr</id>
            <configuration>
              <descriptors>
                <descriptor>${assemblyBinDescriptor}</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <executions>
            <execution>
              <id>default-cli</id>
                <!-- default configuration -->
              <configuration>
                <excludes combine.children="append">
                  <exclude>marker-file-rc-auto-staging-module</exclude>
                  <!-- These markdown files cannot bear a license header -->
                  <exclude>NOTICE.md</exclude>
                  <exclude>CONTRIBUTING.md</exclude>
                  <exclude>src/main/bin_distr_license_notices/NOTICE.md</exclude>
                  <exclude>src/main/bin_distr_license_notices/NOTICE-without-jackson.md</exclude>
                  <!-- These configuration files cannot bear a license header -->
                  <exclude>.github/**/*</exclude>
                  <exclude>src/main/eclipse/org.eclipse.jdt.core.prefs</exclude>
                  <exclude>src/main/eclipse/org.eclipse.jdt.ui.prefs</exclude>
                  <!--  workaround https://issues.apache.org/jira/browse/RAT-97 -->
                  <exclude>aggregate-uimaj*/**</exclude>
                  <exclude>jVinci/**</exclude>
                  <exclude>PearPackagingMavenPlugin/**</exclude>
                  <exclude>jcasgen-maven-plugin/**</exclude>
                  <exclude>uimaj-adapter-*/**</exclude>
                  <exclude>uimaj-bom/**</exclude>
                  <exclude>uima-bnd-plugin/**</exclude>
                  <exclude>uimaj-component-test-util/**</exclude>
                  <exclude>uimaj-core/**</exclude>
                  <exclude>uimaj-cpe/**</exclude>
                  <exclude>uimaj-documentation/**</exclude>
                  <exclude>uimaj-document-annotation/**</exclude>
                  <exclude>uimaj-eclipse-*/**</exclude>
                  <exclude>uimaj-maven-p2-site/**</exclude>
                  <exclude>uimaj-ep-*/**</exclude>
                  <exclude>uimaj-examples/**</exclude>
                  <exclude>uimaj-test-util/**</exclude>
                  <exclude>uimaj-tools/**</exclude>
                  <exclude>uimaj-jet-expander/**</exclude>
                  <exclude>uimaj-bootstrap/**</exclude>
                  <exclude>uimaj-internal-tools/**</exclude>
                  <exclude>uimaj-json/**</exclude>
                  <exclude>uimaj-v3migration-jcas/**</exclude>
                  <exclude>uimaj-it-pear-with-typesystem/**</exclude>
                  <exclude>uimafit-assertj/**</exclude>
                  <exclude>uimafit-benchmark/**</exclude>
                  <exclude>uimafit-core/**</exclude>
                  <exclude>uimafit-cpe/**</exclude>
                  <exclude>uimafit-documentation/**</exclude>
                  <exclude>uimafit-examples/**</exclude>
                  <exclude>uimafit-junit/**</exclude>
                  <exclude>uimafit-maven-plugin/**</exclude>
                  <exclude>uimafit-parent/**</exclude>
                  <exclude>uimafit-root/**</exclude>
                  <exclude>uimafit-spring/**</exclude>
                </excludes>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>dependency-checks</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <version>12.1.5</version>
            <executions>
              <execution>
               <goals><goal>check</goal></goals>
               </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
        
    <profile>
      <id>apache-release-rc-auto-staging-config</id>
      <activation>
        <property>
          <name>!disable-rc-auto-staging</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>release-rc-auto-staging</id>
                <phase>install</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <sequential xmlns:if="ant:if" if:set="isApacheRelease">
                      <mkdir dir="${staging-local-root}/${staging-folder}" />
                      <copy todir="${staging-local-root}/${staging-folder}">
                        <fileset dir="${project.build.directory}">
                          <include name="uimaj-${project.version}-*.zip" />
                          <include name="uimaj-${project.version}-*.zip.asc" />
                          <include name="uimaj-${project.version}-*.zip.sha512" />
                          <include name="uimaj-${project.version}-*.tar.gz" />
                          <include name="uimaj-${project.version}-*.tar.gz.asc" />
                          <include name="uimaj-${project.version}-*.tar.gz.sha512" />
                        </fileset>
                      </copy>
                      <copy todir="${staging-local-root}/${staging-folder}/eclipse-update-site">
                        <fileset dir="uimaj-eclipse-update-site/target/repository">
                          <include name="**/*" />
                        </fileset>
                      </copy>
                    </sequential>
                    <sequential xmlns:unless="ant:unless" unless:set="iisApacheRelease">
                      <echo level="info">Not preparing RC staging - this is not a release build</echo>
                    </sequential>
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
