<!--

    Copyright (c) 2016, 2023, Oracle and/or its affiliates.  All rights reserved.
    This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl
    or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.oracle.oci.sdk</groupId>
    <artifactId>oci-hdfs</artifactId>
    <version>3.3.4.1.1.0</version>
  </parent>

  <artifactId>oci-hdfs-example</artifactId>
  <name>Oracle Cloud Infrastructure HDFS Connector for Storage Service - Example</name>
  <description>This project contains an example for the HDFS connector used to integrate with the Oracle Cloud Infrastructure Object Storage Service</description>

  <profiles>
    <profile>
      <id>bintray-deploy</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>deploy-file</id>
                <phase>deploy</phase>
                <goals>
                    <goal>deploy-file</goal>
                </goals>
                <configuration>
                  <file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
                  <sources>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</sources>
                  <javadoc>${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar</javadoc>
                  <pomFile>pom.xml</pomFile>
                  <url>https://api.bintray.com/maven/${env.BINTRAY_GROUPNAME}/${env.BINTRAY_REPOSITORY_NAME}/${env.JAVA_PROJECT_NAME}/;publish=${env.BINTRAY_PUBLISH}</url>
                  <repositoryId>bintray-${env.BINTRAY_GROUPNAME}-${env.BINTRAY_REPOSITORY_NAME}</repositoryId>
                  <retryFailedDeploymentCount>5</retryFailedDeploymentCount>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-maven-plugin</artifactId>
        <version>1.18.12.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <source>8</source>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- Direct dependencies -->
    <dependency>
        <groupId>com.oracle.oci.sdk</groupId>
        <artifactId>oci-hdfs-connector</artifactId>
        <version>3.3.4.1.1.0</version>
    </dependency>
    <!-- For setting up an HTTP proxy -->
    <dependency>
      <groupId>org.littleshoot</groupId>
      <artifactId>littleproxy</artifactId>
      <version>1.1.2</version>
      <exclusions>
        <exclusion>
          <groupId>io.netty</groupId>
          <artifactId>netty-all</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- For parsing CLI arguments -->
    <dependency>
      <groupId>args4j</groupId>
      <artifactId>args4j</artifactId>
      <version>2.33</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>2.17.1</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>${hadoop.version}</version>
      <exclusions>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.squareup.okhttp</groupId>
          <artifactId>okhttp</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-databind</artifactId>
        </exclusion>
        <!--
          Deal with CVE-2021-28165:
          Exclude Jetty (9.4.20.v20190813) from Hadoop 3.3.1 and include a fixed version 9.4.43.v20210629 (or higher) directly.
        -->
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-servlet</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-security</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-util-ajax</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-io</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-xml</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-http</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-util</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty.websocket</groupId>
          <artifactId>websocket-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty.websocket</groupId>
          <artifactId>websocket-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty.websocket</groupId>
          <artifactId>websocket-api</artifactId>
        </exclusion>
        <!-- End: Deal with CVE-2021-28165 -->
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.9.3</version>
    </dependency>
    <!--
      Deal with CVE-2021-28165:
      Specifically add Jetty 9.4.43.v20210629 (or higher) back, since version 9.4.20.v20190813 was removed from Hadoop 3.3.1.
    -->
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</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-util-ajax</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-io</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-xml</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-http</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-client</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <artifactId>websocket-client</artifactId>
      <version>${jetty.websocket.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <artifactId>websocket-api</artifactId>
      <version>${jetty.websocket.version}</version>
    </dependency>
    <!-- End: Deal with CVE-2021-28165 -->
  </dependencies>
</project>
