<?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>16</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

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

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

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

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- dependency versions -->
    <junit.version>4.12</junit.version>
    <selenium.version>3.13.0</selenium.version>
    <mockito.version>1.9.5</mockito.version>
    <wiremock.version>2.5.1</wiremock.version>
    <postgresql.version>42.1.3</postgresql.version>
    <mysql.version>5.1.47</mysql.version>
    <hsqldb.version>2.3.2</hsqldb.version>
    <jetty.version>9.4.48.v20220622</jetty.version>
    <jetty-jsp-jdt.version>2.3.3</jetty-jsp-jdt.version>
    <jetty-schemas.version>3.1.M0</jetty-schemas.version>
    <mail.version>1.6.2</mail.version>
    <activation.version>1.1.1</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.4</commons-io.version>
    <commons-logging.version>1.2</commons-logging.version>
    <commons-collections.version>3.2.2</commons-collections.version>
    <commons-fileupload.version>1.3.3</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>3.1.0</servlet-api.version>
    <jstl.version>1.2</jstl.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>2.6.0</xmlbeans.version>
    <poi.version>3.17</poi.version>
    <tika.version>1.28.1</tika.version>    <boilerpipe.version>1.1.0</boilerpipe.version>
    <hadoop.version>2.6.0</hadoop.version>
    <tomcat.version>6.0.35</tomcat.version>
    <ecj.version>4.3.1</ecj.version>
    <json-simple.version>1.1.1</json-simple.version>
    <commons-exec.version>1.3</commons-exec.version>
    <jna.version>4.1.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.0</cxf.version>
    <jaxws-ri.version>2.3.2</jaxws-ri.version>
  </properties>

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

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.1</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</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>3.11.0</version>
        <configuration>
          <source>11</source>
          <target>11</target>
          <fork>true</fork>
          <meminitial>128m</meminitial>
          <maxmem>512m</maxmem>        </configuration>
      </plugin>

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

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
      </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>1.0.4</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>
                    <configuration>
                        <updateReleaseInfo>true</updateReleaseInfo>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</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>
                        </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>
