<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2024 Hazelcast Inc.
  ~
  ~ Licensed under the Hazelcast Community License (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://hazelcast.com/hazelcast-community-license
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES 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">
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>

    <name>hazelcast-jet-files-s3</name>
    <description>Hazelcast Jet File Connector for AWS S3</description>

    <artifactId>hazelcast-jet-files-s3</artifactId>

    <parent>
        <artifactId>hazelcast-jet-hadoop-dist</artifactId>
        <groupId>com.hazelcast.jet</groupId>
        <version>5.5.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <configuration combine.self="append">
                    <filters>
                        <filter>
                            <artifact>software.amazon.awssdk:bundle</artifact>
                            <includes>
                                <include>**/s3/**</include>
                                <include>**/slf4j/**</include>
                            </includes>
                        </filter>
                    </filters>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-aws</artifactId>
            <version>${hadoop.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>software.amazon.awssdk</groupId>
                    <artifactId>bundle</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--
            Jet S3 connector was developed using a different AWS SDK version than
            the one bundled with Hadoop AWS support. For the basic functionality,
            software.amazon.awssdk:s3 is enough, but unlike com.amazonaws:aws-java-sdk-s3,
            it does not include all **/s3/** classes, such as **/transfer/s3/**. Shading
            whole software.amazon.awssdk:bundle results in a huge artifact: ~30M vs ~300M.
        -->
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>bundle</artifactId>
            <version>${aws.sdk2.version}</version>
        </dependency>
    </dependencies>
</project>
