<?xml version="1.0"?>
<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>
    <groupId>fr.pilato.elasticsearch.crawler</groupId>
    <artifactId>fscrawler-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.8</version>
    <modules>
        <module>framework</module>
        <module>test-framework</module>
        <module>settings</module>
        <module>test-documents</module>
        <module>beans</module>
        <module>3rdparty</module>
        <module>elasticsearch-client</module>
        <module>core</module>
        <module>integration-tests</module>
        <module>distribution</module>
        <module>cli</module>
        <module>tika</module>
        <module>crawler</module>
        <module>rest</module>
        <module>docs</module>
    </modules>
    <name>FSCrawler</name>
    <url>https://github.com/dadoonet/fscrawler/</url>
    <description>FS Crawler offers a simple way to index binary files into elasticsearch.</description>

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

    <!--suppress CheckTagEmptyBody -->
    <properties>
        <elasticsearch7.version>7.16.1</elasticsearch7.version>
        <elasticsearch6.version>6.8.21</elasticsearch6.version>
        <elasticsearch.version>${elasticsearch7.version}</elasticsearch.version>

        <tika.version>2.1.0</tika.version>
        <jackson.version>2.13.0</jackson.version>
        <jsonpath.version>2.6.0</jsonpath.version>
        <slf4j.version>1.7.32</slf4j.version>
        <log4j.version>2.15.0</log4j.version>
        <jansi.version>2.4.0</jansi.version>
        <jersey.version>3.0.3</jersey.version>

        <!--
            Because elasticsearch is not using transitive dependencies, we need to be explicit here
        -->
        <commons-logging.version>1.2</commons-logging.version>
        <commons-codec.version>1.15</commons-codec.version>
        <snakeyaml.version>1.29</snakeyaml.version>
        <httpclient.version>4.5.13</httpclient.version>
        <httpasyncclient.version>4.1.5</httpasyncclient.version>
        <httpcore.version>4.4.15</httpcore.version>

        <!-- Non Apache2 Compatible licenses -->
        <imageio.version>3.0.3</imageio.version>
        <tiff.version>1.4.0</tiff.version>
        <jpeg.version>1.4.0</jpeg.version>

        <!-- To skip Tests -->
        <skipTests>false</skipTests>
        <skipUnitTests>${skipTests}</skipUnitTests>
        <skipIntegTests>${skipTests}</skipIntegTests>

        <!-- For integration tests using Docker Compose or external cluster -->
        <contrib.dir>${project.basedir}/contrib</contrib.dir>
        <integ.elasticsearch.image>docker.elastic.co/elasticsearch/elasticsearch</integ.elasticsearch.image>
        <integ.elasticsearch.version>${elasticsearch.version}</integ.elasticsearch.version>
        <integ.elasticsearch.port>9200</integ.elasticsearch.port>
        <integ.workplace.image>docker.elastic.co/enterprise-search/enterprise-search</integ.workplace.image>
        <integ.workplace.port>3002</integ.workplace.port>
        <tests.cluster.url></tests.cluster.url>
        <tests.cluster.cloud_id></tests.cluster.cloud_id>
        <tests.cluster.user>elastic</tests.cluster.user>
        <tests.cluster.pass>changeme</tests.cluster.pass>
        <tests.workplace.url></tests.workplace.url>
        <tests.workplace.user>${tests.cluster.user}</tests.workplace.user>
        <tests.workplace.pass>${tests.cluster.pass}</tests.workplace.pass>
        <tests.rest.port>8080</tests.rest.port>

        <!-- Randomized testing framework -->
        <tests.locale>random</tests.locale>
        <tests.timezone>random</tests.timezone>
        <tests.output>onError</tests.output>
        <tests.verbose>false</tests.verbose>
        <tests.leaveTemporary>false</tests.leaveTemporary>
        <tests.parallelism>auto</tests.parallelism>
        <tests.seed></tests.seed>
        <!-- Running the tests with Tesseract OCR might take time -->
        <tests.timeoutSuite>600000</tests.timeoutSuite>
        <tests.timeout>600000</tests.timeout>

        <!-- For CVE Audit with Sonatype -->
        <env.SONATYPE_USER></env.SONATYPE_USER>
        <env.SONATYPE_PASS></env.SONATYPE_PASS>
        <sonatype.username>${env.SONATYPE_USER}</sonatype.username>
        <sonatype.password>${env.SONATYPE_PASS}</sonatype.password>

        <!-- For DockerHub to push images -->
        <!--suppress UnresolvedMavenProperty -->
        <env.DOCKER_USERNAME>${DOCKER_USERNAME}</env.DOCKER_USERNAME>
        <!--suppress UnresolvedMavenProperty -->
        <env.DOCKER_PASSWORD>${DOCKER_PASSWORD}</env.DOCKER_PASSWORD>
        <docker.push.username>${env.DOCKER_USERNAME}</docker.push.username>
        <docker.push.password>${env.DOCKER_PASSWORD}</docker.push.password>

        <java.compiler.version>11</java.compiler.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <developers>
        <developer>
            <id>dadoonet</id>
            <name>David Pilato</name>
            <email>david@pilato.fr</email>
            <url>https://david.pilato.fr/</url>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:dadoonet/fscrawler.git</connection>
        <url>scm:git:git@github.com:dadoonet/fscrawler.git</url>
        <developerConnection>scm:git:git@github.com:dadoonet/fscrawler.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/dadoonet/fscrawler/issues/</url>
    </issueManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <release>${java.compiler.version}</release>
                        <encoding>UTF-8</encoding>
                        <optimize>true</optimize>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <compilerArgument>-Xlint:all,-serial,-path,-rawtypes,-unchecked</compilerArgument>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-help-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <propertiesEncoding>UTF-8</propertiesEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.8.1</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <skipIfEmpty>true</skipIfEmpty>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>com.carrotsearch.randomizedtesting</groupId>
                    <artifactId>junit4-maven-plugin</artifactId>
                    <version>2.7.9</version>
                    <configuration>
                        <heartbeat>10</heartbeat>
                        <jvmOutputAction>pipe,ignore</jvmOutputAction>
                        <leaveTemporary>${tests.leaveTemporary}</leaveTemporary>
                        <ifNoTests>warn</ifNoTests>
                        <parallelism>${tests.parallelism}</parallelism>
                        <listeners>
                            <report-text showThrowable="true" showStackTraces="true" showOutput="${tests.output}"
                                         showStatusOk="${tests.verbose}" showStatusError="true" showStatusFailure="true"
                                         showStatusIgnored="true" showSuiteSummary="${tests.verbose}" />
                        </listeners>
                        <seed>${tests.seed}</seed>
                        <systemProperties combine.children="append">
                            <arg.common>arg.common</arg.common>
                            <tests.timeoutSuite>${tests.timeoutSuite}</tests.timeoutSuite>
                            <tests.locale>${tests.locale}</tests.locale>
                            <tests.timezone>${tests.timezone}</tests.timezone>
                            <java.util.logging.manager>org.apache.logging.log4j.jul.LogManager</java.util.logging.manager>
                            <java.awt.headless>true</java.awt.headless>
                            <tests.cluster.url>${tests.cluster.url}</tests.cluster.url>
                            <tests.cluster.cloud_id>${tests.cluster.cloud_id}</tests.cluster.cloud_id>
                            <tests.cluster.user>${tests.cluster.user}</tests.cluster.user>
                            <tests.cluster.pass>${tests.cluster.pass}</tests.cluster.pass>
                            <tests.workplace.url>${tests.workplace.url}</tests.workplace.url>
                            <tests.workplace.user>${tests.workplace.user}</tests.workplace.user>
                            <tests.workplace.pass>${tests.workplace.pass}</tests.workplace.pass>
                            <tests.rest.port>${tests.rest.port}</tests.rest.port>
                        </systemProperties>
                    </configuration>

                    <executions>
                        <execution>
                            <id>unit-tests</id>
                            <phase>test</phase>
                            <goals>
                                <goal>junit4</goal>
                            </goals>
                            <inherited>true</inherited>
                            <configuration>
                                <skipTests>${skipUnitTests}</skipTests>
                                <includes>
                                    <include>**/*Test.class</include>
                                </includes>
                                <excludes>
                                    <exclude>**/*$*</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                        <execution>
                            <id>integration-tests</id>
                            <phase>integration-test</phase>
                            <goals>
                                <goal>junit4</goal>
                            </goals>
                            <inherited>true</inherited>
                            <configuration>
                                <skipTests>${skipIntegTests}</skipTests>
                                <includes>
                                    <include>**/*IT.class</include>
                                </includes>
                                <excludes>
                                    <exclude>**/*$*</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- Disable surefire so we can use randomize testing framework -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                    <executions>
                        <execution>
                            <id>default-test</id>
                            <phase>none</phase>
                        </execution>
                    </executions>
                </plugin>

                <!-- To build and publish our docker images -->
                <plugin>
                    <groupId>io.fabric8</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>0.38.0</version>
                </plugin>

                <!-- For IT using Docker Compose -->
                <plugin>
                    <groupId>com.dkanejs.maven.plugins</groupId>
                    <artifactId>docker-compose-maven-plugin</artifactId>
                    <version>4.0.0</version>
                    <configuration>
                        <envFile>${contrib.dir}/docker-compose-it/.env</envFile>
                        <envVars>
                            <ELASTIC_VERSION>${integ.elasticsearch.version}</ELASTIC_VERSION>
                            <ELASTIC_PASSWORD>${tests.cluster.pass}</ELASTIC_PASSWORD>
                            <IMG_ELASTICSEARCH>${integ.elasticsearch.image}</IMG_ELASTICSEARCH>
                            <ELASTICSEARCH_PORT>${integ.elasticsearch.port}</ELASTICSEARCH_PORT>
                            <IMG_ENTERPRISE_SEARCH>${integ.workplace.image}</IMG_ENTERPRISE_SEARCH>
                            <ENTERPRISE_SEARCH_PORT>${integ.workplace.port}</ENTERPRISE_SEARCH_PORT>
                            <LICENSE_TYPE>trial</LICENSE_TYPE>
                        </envVars>
                        <composeFiles>
                            <composeFile>${contrib.dir}/docker-compose-it/docker-compose.yml</composeFile>
                        </composeFiles>
                        <services>
                            <service>elasticsearch</service>
                            <service>enterprisesearch</service>
                        </services>
                        <ignorePullFailures>true</ignorePullFailures>
                        <removeOrphans>true</removeOrphans>
                        <removeVolumes>true</removeVolumes>
<!--                        <awaitCmd>foo.sh</awaitCmd>-->
<!--                        <awaitCmdArgs>foo,bar</awaitCmdArgs>-->
<!--                        <awaitTimeout>60</awaitTimeout>-->
                        <detachedMode>true</detachedMode>
                    </configuration>
                    <executions>
                        <execution>
                            <id>up</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>down</goal>
                                <goal>up</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>down</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>down</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>de.scravy</groupId>
                    <artifactId>waitfor-maven-plugin</artifactId>
                    <version>1.3</version>
                    <configuration>
                        <quiet>true</quiet>
                        <chatty>false</chatty>
                        <timeoutSeconds>600</timeoutSeconds>
                        <checkEveryMillis>1000</checkEveryMillis>
                        <!-- Each module should use its own checks like below -->
                        <!--
                        <checks>
                            <check>
                                <url>http://localhost:9200/</url>
                                <statusCode>401</statusCode>
                            </check>
                            <check>
                                <url>http://localhost:3002/</url>
                                <statusCode>200</statusCode>
                            </check>
                        </checks>
                        -->
                    </configuration>
                    <executions>
                        <execution>
                            <id>wait-for-environment-to-be-up</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>waitfor</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Generate the release zip file (run during package step) -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M3</version>
                    <configuration>
                        <rules>
                            <requireJavaVersion>
                                <version>${java.compiler.version}</version>
                            </requireJavaVersion>
                            <dependencyConvergence/>
                            <requireMavenVersion>
                                <version>3.3</version>
                            </requireMavenVersion>
                        </rules>
                    </configuration>
                    <executions>
                        <execution>
                            <id>enforce</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.ossindex.maven</groupId>
                    <artifactId>ossindex-maven-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>audit-dependencies</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>audit</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>sonatype-nexus-staging</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changes-plugin</artifactId>
                    <version>2.12.1</version>
                    <configuration>
                        <smtpHost>auth.smtp.1and1.fr</smtpHost>
                        <smtpPort implementation="java.lang.Integer">465</smtpPort>
                        <sslMode>true</sslMode>
                        <fromDeveloperId>dadoonet</fromDeveloperId>
                        <toAddresses>
                            <toAddress implementation="java.lang.String">discuss+community-plugins@elastic.co</toAddress>
                        </toAddresses>
                        <issueManagementSystems>
                            <issueManagementSystem>GitHub</issueManagementSystem>
                        </issueManagementSystems>
                        <issueTypes>
                            <add>new,doc</add>
                            <fix>bug</fix>
                            <update>update</update>
                            <remove>remove</remove>
                        </issueTypes>
                        <onlyCurrentVersion>true</onlyCurrentVersion>
                        <urlDownload>https://repo1.maven.org/maven2/fr/pilato/elasticsearch/crawler/fscrawler-es7/${project.version}</urlDownload>
                        <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-framework</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-test-framework</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-test-documents</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-it-common</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-core</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-settings</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-elasticsearch-client</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-elasticsearch-client-base</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-elasticsearch-client-v6</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-elasticsearch-client-v7</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-workplacesearch-client</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-cli</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-beans</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-crawler</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-crawler-abstract</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-crawler-fs</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-crawler-ftp</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-crawler-ssh</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-tika</artifactId>
                <version>2.8</version>
            </dependency>
            <dependency>
                <groupId>fr.pilato.elasticsearch.crawler</groupId>
                <artifactId>fscrawler-rest</artifactId>
                <version>2.8</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-xml</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-module-jaxb-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-jaxb-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path</artifactId>
                <version>${jsonpath.version}</version>
            </dependency>
            <!--
            Because elasticsearch is not using transitive dependencies, we need to be explicit here
            -->
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
            </dependency>
            <!-- this is needed for Tika 1.27 vs Jackson 2.12.3 -->
            <dependency>
                <groupId>com.fasterxml.woodstox</groupId>
                <artifactId>woodstox-core</artifactId>
                <version>6.2.7</version>
            </dependency>

            <!-- This is needed to compile on my machine :( -->
            <dependency>
                <groupId>com.sun.activation</groupId>
                <artifactId>jakarta.activation</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>jakarta.activation</groupId>
                <artifactId>jakarta.activation-api</artifactId>
                <version>2.0.1</version>
            </dependency>
            <!-- This is needed to compile on my machine :( -->
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>3.0.1</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.3.1</version>
            </dependency>

            <!-- We manually update until we have a Tika 1.23 version available -->
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>4.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-scratchpad</artifactId>
                <version>4.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>4.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.21</version>
            </dependency>

            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-core</artifactId>
                <version>${tika.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parsers-standard-package</artifactId>
                <version>${tika.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parser-scientific-module</artifactId>
                <version>${tika.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parser-sqlite3-module</artifactId>
                <version>${tika.version}</version>
            </dependency>

            <!-- Fix tika-parsers-standard-package 2.0.0 vs tika-parser-scientific-module:2.0.0 transitive dependency -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>1.7.32</version>
            </dependency>

            <!-- Fix org.elasticsearch.client:elasticsearch-rest-high-level-client:7.16.1 vs org.apache.tika:tika-parser-scientific-module:2.1.0 transitive dependency -->
            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>5.10.0</version>
            </dependency>

            <!-- Fix json-path 2.6.0 vs tika 1.27 transitive dependency -->
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>9.2</version>
            </dependency>

            <!-- Because of CVE-2019-5427 and CVE-2019-13990. Comes from tika-parser-scientific-module:2.0.0 dep -->
            <dependency>
                <groupId>org.quartz-scheduler</groupId>
                <artifactId>quartz</artifactId>
                <version>2.3.2</version>
            </dependency>

            <!-- Because of CVE-2021-37714 and CVE-2015-6748 - this comes from Tika 2.1.0 -->
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>1.14.3</version>
            </dependency>

            <!-- Version conflict between
            org.apache.tika:tika-parser-scientific-module:2.1.0 deps
            org.apache.tika:tika-langdetect-optimaize:2.1.0 deps
            -->
            <!-- Because of CVE-2020-8908 and CVE-2018-10237 - this comes from Tika 2.1.0 -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>31.0.1-jre</version>
            </dependency>

            <!-- Version conflict between
            org.apache.tika:tika-parsers-standard-package:2.1.0 deps
            org.apache.tika:tika-parser-scientific-module:2.1.0 deps
            -->
            <dependency>
                <groupId>org.jdom</groupId>
                <artifactId>jdom2</artifactId>
                <version>2.0.6.1</version>
            </dependency>

            <!-- Version conflict between
            org.apache.tika:tika-parsers-standard-package:2.1.0 deps
            -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.12.0</version>
            </dependency>

            <!-- Version conflict between
            org.elasticsearch.client:elasticsearch-rest-high-level-client:7.14.1 deps
            org.apache.tika:tika-parser-scientific-module:2.1.0 deps
            -->
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.10.13</version>
            </dependency>

            <!-- For Language detection -->
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-langdetect-optimaize</artifactId>
                <version>${tika.version}</version>
            </dependency>

            <!-- Dependency for parsing remote ssh directory [http://www.jcraft.com/jsch/] -->
            <dependency>
                <groupId>com.jcraft</groupId>
                <artifactId>jsch</artifactId>
                <version>0.1.55</version>
            </dependency>

            <!-- Dependency for parsing remote ftp directory -->
            <dependency>
                <groupId>commons-net</groupId>
                <artifactId>commons-net</artifactId>
                <version>3.8.0</version>
            </dependency>
            <dependency>
                <groupId>org.mockftpserver</groupId>
                <artifactId>MockFtpServer</artifactId>
                <version>3.0.0</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- For CLI -->
            <dependency>
                <groupId>com.beust</groupId>
                <artifactId>jcommander</artifactId>
                <version>1.81</version>
            </dependency>

            <!-- For REST Server -->
            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-grizzly2-http</artifactId>
                <version>${jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.media</groupId>
                <artifactId>jersey-media-json-jackson</artifactId>
                <version>${jersey.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.module</groupId>
                        <artifactId>jackson-module-jaxb-annotations</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.media</groupId>
                <artifactId>jersey-media-multipart</artifactId>
                <version>${jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.inject</groupId>
                <artifactId>jersey-hk2</artifactId>
                <version>${jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-client</artifactId>
                <version>${jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-common</artifactId>
                <version>${jersey.version}</version>
            </dependency>
            <!-- Some Jersey transitive dependencies are using a 1.3.4 version so we need to be explicit -->
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>2.0.0</version>
            </dependency>
            <!-- Logging dependencies -->
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-1.2-api</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-jcl</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-jul</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-iostreams</artifactId>
                <version>${log4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.fusesource.jansi</groupId>
                <artifactId>jansi</artifactId>
                <version>${jansi.version}</version>
                <optional>true</optional>
            </dependency>
            <!--
                Because elasticsearch is not using transitive dependencies, we need to be explicit here
            -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${commons-logging.version}</version>
            </dependency>
            <!--
                Because of json-path  which is using a higher version, we need to be explicit here
            -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.11.0</version>
            </dependency>

            <!-- Used by elasticsearch client and tika parsers -->
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpasyncclient</artifactId>
                <version>${httpasyncclient.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>${httpcore.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore-nio</artifactId>
                <version>${httpcore.version}</version>
            </dependency>
            <!-- Used by htmlunit client and tika parsers -->
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpmime</artifactId>
                <version>${httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons-codec.version}</version>
            </dependency>

            <!-- Test dependencies -->
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
            </dependency>
            <dependency>
                <groupId>com.carrotsearch.randomizedtesting</groupId>
                <artifactId>randomizedtesting-runner</artifactId>
                <version>2.7.9</version>
            </dependency>
            <!-- CVE Temporary Fix -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>1.70</version>
            </dependency>
            <!-- CVE Temporary Fix -->
            <dependency>
                <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>websocket-client</artifactId>
                <version>9.4.44.v20210927</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <!-- This repository is used to test with x-pack -->
        <repository>
            <id>elastic-download-service</id>
            <name>Elastic Download Service</name>
            <url>https://artifacts.elastic.co/maven/</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </repository>

        <repository>
            <id>oss-snapshots</id>
            <name>Sonatype OSS Snapshots</name>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>

        <!-- Only used for Tika release candidates -->
        <!--
        <repository>
            <id>tika-rc</id>
            <name>Tika Release Candidates</name>
            <url>https://repository.apache.org/content/repositories/orgapachetika-1061/</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </repository>
        -->
    </repositories>

    <profiles>
        <profile>
            <id>skip-docker-compose</id>
            <activation>
                <property>
                    <name>tests.cluster.url</name>
                </property>
            </activation>
        </profile>
        <profile>
            <id>run-docker-compose</id>
            <activation>
                <property>
                    <name>!tests.cluster.url</name>
                </property>
            </activation>
        </profile>
        <profile>
            <id>check_cve_anonymous</id>
            <activation>
                <property>
                    <name>!sonatype.username</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- For each module, we automatically check for vulnerabilities -->
                    <plugin>
                        <groupId>org.sonatype.ossindex.maven</groupId>
                        <artifactId>ossindex-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>check_cve_auth</id>
            <activation>
                <property>
                    <name>sonatype.username</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- For each module, we automatically check for vulnerabilities -->
                    <plugin>
                        <groupId>org.sonatype.ossindex.maven</groupId>
                        <artifactId>ossindex-maven-plugin</artifactId>
                        <configuration>
                            <clientConfiguration>
                                <authConfiguration>
                                    <username>${sonatype.username}</username>
                                    <password>${sonatype.password}</password>
                                </authConfiguration>
                            </clientConfiguration>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <properties>
                <!-- The ocr version will be the default one for anyone trying docker pull dadoonet/fscrawler -->
                <docker.ocr.tags.1>latest</docker.ocr.tags.1>
            </properties>
            <build>
                <plugins>
                    <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>
                    <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-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
