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

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>37</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.apache.manifoldcf</groupId>
  <artifactId>mcf-parent</artifactId>
  <version>2.30</version>

  <name>ManifoldCF</name>
  <packaging>pom</packaging>

  <organization>
    <name>The Apache Software Foundation</name>
    <url>https://www.apache.org/</url>
  </organization>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- dependency versions -->
    <junit.version>4.12</junit.version>
    <junit-jupiter.version>5.13.4</junit-jupiter.version>
    <selenium.version>3.13.0</selenium.version>
    <mockito.version>5.20.0</mockito.version>
    <wiremock.version>3.13.1</wiremock.version>
    <postgresql.version>42.7.4</postgresql.version>
    <mysql.version>5.1.47</mysql.version>
    <hsqldb.version>2.6.1</hsqldb.version>
    <jetty.version>12.0.10</jetty.version>
    <jetty-jsp-jdt.version>2.3.3</jetty-jsp-jdt.version>
    <jetty-schemas.version>5.0</jetty-schemas.version>
    <mail.version>2.1.3</mail.version>
    <activation.version>2.1.3</activation.version>
    <axis.version>1.4</axis.version>
    <wsdl4j.version>1.6.2</wsdl4j.version>
    <castor.version>1.0.5</castor.version>
    <commons-codec.version>1.10</commons-codec.version>
    <commons-io.version>2.16.1</commons-io.version>
    <commons-logging.version>1.2</commons-logging.version>
    <commons-collections.version>3.2.2</commons-collections.version>
    <commons-fileupload.version>2.0.0-M2</commons-fileupload.version>
    <commons-discovery.version>0.5</commons-discovery.version>
    <httpcomponent.httpclient.version>4.5.13</httpcomponent.httpclient.version>
    <httpcomponent.httpcore.version>4.4.15</httpcomponent.httpcore.version>
    <httpcomponent.httpmime.version>4.5.13</httpcomponent.httpmime.version>
    <solr.version>9.1.0</solr.version>
    <noggit.version>0.8</noggit.version>
    <commons-el.version>1.0</commons-el.version>
    <commons-lang.version>2.6</commons-lang.version>
    <xalan.version>2.7.1</xalan.version>
    <xerces.version>2.12.2</xerces.version>
    <xml-apis.version>1.4.01</xml-apis.version>
    <jtds.version>1.2.4</jtds.version>
    <mariadb.version>1.1.7</mariadb.version>
    <servlet-api.version>6.0.0</servlet-api.version>
    <jakarta.transaction-api.version>2.0.0</jakarta.transaction-api.version>
    <jsp-api.version>3.1.1</jsp-api.version>
    <jstl.version>3.0.1</jstl.version>
    <javax-el.version>5.0.1</javax-el.version>
    <glassfish.version>2.1.v20091210</glassfish.version>
    <log4j.version>2.17.2</log4j.version>
    <velocity-engine-core.version>2.3</velocity-engine-core.version>
    <slf4j.version>1.7.36</slf4j.version>
    <jaxb.version>2.2.6</jaxb.version>
    <zookeeper.version>3.9.1</zookeeper.version>
    <xmlbeans.version>3.1.0</xmlbeans.version>
    <poi.version>4.1.2</poi.version>
    <tika.version>1.28.1</tika.version>
    <boilerpipe.version>1.1.0</boilerpipe.version>
    <hadoop.version>3.3.6</hadoop.version>
    <tomcat.version>10.1.25</tomcat.version>
    <ecj.version>3.39.0</ecj.version>
    <asm.version>9.7</asm.version>
    <json-simple.version>1.1.1</json-simple.version>
    <commons-exec.version>1.3</commons-exec.version>
    <jna.version>5.10.0</jna.version>
    <gson.version>2.8.0</gson.version>
    <guava.version>21.0</guava.version>
    <jsoup.version>1.7.2</jsoup.version>
    <cxf.version>3.5.9</cxf.version>
    <jaxws-ri.version>2.3.2</jaxws-ri.version>
    <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
    <maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
    <maven-rat-plugin.version>0.17</maven-rat-plugin.version>
    <maven-war-plugin.version>3.5.1</maven-war-plugin.version>
    <maven-apache-source-release-assembly-descriptor.version>1.5</maven-apache-source-release-assembly-descriptor.version>
    <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <javaVersion>21</javaVersion>
  </properties>

  <modules>
    <module>framework</module>
    <module>test-materials</module>
    <module>connectors</module>
    <module>framework/jetty-runner</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>jakarta.transaction</groupId>
        <artifactId>jakarta.transaction-api</artifactId>
        <version>${jakarta.transaction-api.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-util</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-ee</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-webapp</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-servlet</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-plus</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-jndi</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-annotations</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-servlets</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-session</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-security</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-io</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-commons</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-tree</artifactId>
        <version>${asm.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
		    <groupId>org.apache.rat</groupId>
		    <artifactId>apache-rat-plugin</artifactId>
		    <version>${maven-rat-plugin.version}</version>
		  </plugin>
      </plugins>
    </pluginManagement>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <!-- Ensure source jars have full manifest entries (note: defaults aren't suitable) -->
            <manifestEntries>
              <Specification-Title>${project.name}</Specification-Title>
              <Specification-Version>${project.version}</Specification-Version>
              <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
              <Implementation-Title>${project.name}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Specification-Title>${project.name}</Specification-Title>
              <Specification-Version>${project.version}</Specification-Version>
              <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
              <Implementation-Title>${project.name}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
              <url>${project.url}</url>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <fork>true</fork>
          <meminitial>128m</meminitial>
          <maxmem>512m</maxmem>
          <compilerArgs>
            <arg>-Xpkginfo:always</arg>
            <arg>-Xlint:options</arg>
          </compilerArgs>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
      </plugin>
      
      <plugin>
	    <groupId>org.apache.rat</groupId>
	    <artifactId>apache-rat-plugin</artifactId>
	    <configuration>
              <inputExcludes>
              	   <inputExcludeFile>.geminiignore</inputExcludeFile>
                   <inputExclude>CHANGES.txt</inputExclude>
                   <inputExclude>DEPENDENCIES.txt</inputExclude>
                   <inputExclude>site/src/documentation/skins/lucene/note.txt</inputExclude>
                   <inputExclude>site/src/documentation/skins/common/xslt/html/split.xsl</inputExclude>
                   <inputExclude>dist-license/DEPENDENCIES.txt</inputExclude>
                   <inputExclude>site/tmp/font/**</inputExclude>
                   <inputExclude>apache-manifoldcf-*/**</inputExclude>
                   <inputExclude>src/main/docker/JDK-21/*.md</inputExclude>
                   <inputExclude>src/main/docker/JDK-11/*.md</inputExclude>
                   <inputExclude>src/main/docker/JDK-8/*.md</inputExclude>
                   <inputExclude>src/main/docker/JDK-7/*.md</inputExclude>
                   <inputExclude>src/main/docker/JDK-6/*.md</inputExclude>
                   <inputExclude>src/main/docker/JDK-5/*.md</inputExclude>
                   <inputExclude>dist/**</inputExclude>
                   <inputExclude>/lib/elasticsearch/**</inputExclude>
                   <inputExclude>/lib/elasticsearch-*/*</inputExclude>
                   <inputExclude>/lib/sharepoint-**/**</inputExclude>
                   <inputExclude>/lib/solr-*/**</inputExclude>
                   <inputExclude>build/download/**</inputExclude>
              </inputExcludes>
         </configuration>
      </plugin>
     
    </plugins>
  </build>

  <profiles>
    <!-- START SNIPPET: release-profile -->
    <profile>
        <id>apache-mcf-release</id>
        <build>
            <plugins>
                <!-- Create a source-release artifact that contains the fully buildable project directory source structure.
                    This is the artifact which is the official subject of any release vote. -->
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.apache.resources</groupId>
                            <artifactId>apache-source-release-assembly-descriptor</artifactId>
                            <version>${maven-apache-source-release-assembly-descriptor.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>source-release-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                                <descriptors>
                                    <descriptor>src/main/assembly/src.xml</descriptor>
                                </descriptors>
                                <tarLongFileMode>gnu</tarLongFileMode>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- We want to deploy the artifact to a staging location for perusal -->
                <plugin>
                    <inherited>true</inherited>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <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>
                <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <configuration>
	                            <gpgArguments>
	                                <arg>--pinentry-mode</arg>
	                                <arg>loopback</arg>
	                            </gpgArguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
    <!-- END SNIPPET: release-profile -->
    <profile>
      <id>postgresql</id>
      <build>
        <defaultGoal>test</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <includes>
                <include>**/*PostgresqlTest.java</include>
              </includes>
            </configuration>
            <executions>
              <execution>
                <phase>test</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
