<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>aws-sdk-java-pom</artifactId>
    <groupId>software.amazon.awssdk</groupId>
    <version>2.46.10</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>bundle-sdk</artifactId>
  <name>AWS Java SDK :: SDK Bundle</name>
  <description>A single bundled dependency that includes all service and dependent JARs with third-party libraries
        relocated to different namespaces.</description>
  <url>https://aws.amazon.com/sdkforjava</url>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.5.0</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <artifactSet>
              <includes>
                <include>com.fasterxml.jackson.jr:*</include>
                <include>io.netty:*</include>
                <include>org.apache.httpcomponents:*</include>
                <include>org.apache.httpcomponents.client5:*</include>
                <include>org.apache.httpcomponents.core5:*</include>
                <include>org.reactivestreams:*</include>
                <include>org.slf4j:*</include>
                <include>commons-codec:commons-codec</include>
                <include>software.amazon.awssdk:*</include>
                <include>software.amazon:*</include>
                <include>software.amazon.s3.accessgrants:*</include>
                <include>software.amazon.lakeformation.plugin.accessgrants:*</include>
                <include>com.github.ben-manes.caffeine:caffeine</include>
                <include>com.google.errorprone:error_prone_annotations</include>
                <inlcude>org.checkerframework:checker-qual</inlcude>
                <include>commons-logging:*</include>
                <include>software.amazon.eventstream:eventstream</include>
              </includes>
            </artifactSet>
            <filters>
              <filter>
                <artifact>com.github.ben-manes.caffeine:caffeine</artifact>
                <excludes>
                  <exclude>META-INF/jandex.idx</exclude>
                </excludes>
              </filter>
            </filters>
            <relocations>
              <relocation>
                <pattern>org.apache</pattern>
                <shadedPattern>software.amazon.awssdk.thirdparty.org.apache</shadedPattern>
                <excludes>
                  <exclude>org.apache.log4j.*</exclude>
                </excludes>
              </relocation>
              <relocation>
                <pattern>io.netty</pattern>
                <shadedPattern>software.amazon.awssdk.thirdparty.io.netty</shadedPattern>
              </relocation>
              <relocation>
                <pattern>org.slf4j</pattern>
                <shadedPattern>software.amazon.awssdk.thirdparty.org.slf4j</shadedPattern>
              </relocation>
              <relocation>
                <pattern>com.github.benmanes.caffeine</pattern>
                <shadedPattern>software.amazon.awssdk.thirdparty.com.github.benmanes.caffeine</shadedPattern>
              </relocation>
              <relocation>
                <pattern>org.checkerframework</pattern>
                <shadedPattern>software.amazon.awssdk.thirdparty.org.checkerframework</shadedPattern>
              </relocation>
              <relocation>
                <pattern>com.google.errorprone</pattern>
                <shadedPattern>software.amazon.awssdk.thirdparty.com.google.errorprone</shadedPattern>
              </relocation>
            </relocations>
            <shadedArtifactAttached>false</shadedArtifactAttached>
            <createDependencyReducedPom>true</createDependencyReducedPom>
            <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>enforce-bytecode-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <enforceBytecodeVersion>
                  <maxJdkVersion>${jre.version}</maxJdkVersion>
                  <excludes>
                    <exclude>software.amazon.awssdk:aws-sdk-java</exclude>
                  </excludes>
                </enforceBytecodeVersion>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>extra-enforcer-rules</artifactId>
            <version>1.9.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>publishing</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>javadoc-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <sourcepath>${basedir}/../core/profiles/src/main/java/software/amazon/awssdk/profiles;${basedir}/../core/sdk-core/src/main/java/software/amazon/awssdk/core</sourcepath>
              <failOnError>false</failOnError>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>central-portal-publishing</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>javadoc-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <sourcepath>${basedir}/../core/profiles/src/main/java/software/amazon/awssdk/profiles;${basedir}/../core/sdk-core/src/main/java/software/amazon/awssdk/core</sourcepath>
              <failOnError>false</failOnError>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>bom-internal</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <sonar.skip>true</sonar.skip>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
