<?xml version="1.0"?>
<!--
  ~ Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License").
  ~ You may not use this file except in compliance with the License.
  ~ A copy of the License is located at
  ~
  ~  http://aws.amazon.com/apache2.0
  ~
  ~ or in the "license" file accompanying this file. This file is distributed
  ~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  ~ express or implied. See the License for the specific language governing
  ~ permissions and limitations under the License.
  -->

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>aws-sdk-java-pom</artifactId>
        <version>2.0.5</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>aws-sdk-java</artifactId>
    <name>AWS SDK for Java</name>
    <description>The Amazon Web Services SDK for Java provides Java APIs for building software on AWS' cost-effective,
        scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all
        of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service,
        Amazon AutoScaling, etc).
    </description>
    <url>https://aws.amazon.com/sdkforjava</url>

    <dependencies>
        <dependency>
            <artifactId>kinesis</artifactId>
            <groupId>software.amazon.awssdk</groupId>
            <version>[${awsjavasdk.version}]</version>
        </dependency>
        <dependency>
            <artifactId>dynamodb</artifactId>
            <groupId>software.amazon.awssdk</groupId>
            <version>[${awsjavasdk.version}]</version>
        </dependency>
        <dependency>
            <artifactId>cloudwatch</artifactId>
            <groupId>software.amazon.awssdk</groupId>
            <version>[${awsjavasdk.version}]</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <configuration>
                    <ignoredUnusedDeclaredDependencies>
                        <ignoredUnusedDeclaredDependency>software.amazon.awssdk:*</ignoredUnusedDeclaredDependency>
                    </ignoredUnusedDeclaredDependencies>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- This profile uses the JAPICMP plugin to generate a report of changes between the release version and the latest version -->
    <!-- For more information on the plugin, see https://github.com/siom79/japicmp -->
    <profiles>
        <profile>
            <id>versiondiff</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.siom79.japicmp</groupId>
                        <artifactId>japicmp-maven-plugin</artifactId>
                        <version>0.5.0</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>cmp</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <oldVersion>
                                <dependency>
                                    <groupId>software.amazon.awssdk</groupId>
                                    <artifactId>aws-java-sdk</artifactId>
                                    <version>RELEASE</version>
                                </dependency>
                            </oldVersion>
                            <newVersion>
                                <file>
                                    <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
                                </file>
                            </newVersion>
                            <parameter>
                                <onlyModified>true</onlyModified>
                                <accessModifier>public</accessModifier>
                                <breakBuildOnModifications>false</breakBuildOnModifications>
                                <breakBuildOnBinaryIncompatibleModifications>false
                                </breakBuildOnBinaryIncompatibleModifications>
                                <onlyBinaryIncompatible>false</onlyBinaryIncompatible>
                            </parameter>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
