<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.sonymusic</groupId>
    <artifactId>hadoop-aws-shaded</artifactId>
    <version>3.2.1</version>

    <dependencies>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-aws</artifactId>
            <version>3.2.1</version>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>delphi-nexus</id>
            <name>Delphi Nexus</name>
            <url>https://artifacts.apollo.stream/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>delphi-nexus-snapshots</id>
            <url>https://artifacts.apollo.stream/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>

                            <artifactSet>
                                <includes>
                                    <include>org.apache.hadoop:hadoop-aws</include>
                                    <include>com.amazonaws:aws-java-sdk</include>
                                </includes>
                            </artifactSet>

                            <relocations>
                                <relocation>
                                    <pattern>com.amazonaws</pattern>
                                    <shadedPattern>com.amazonaws.shaded</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
