<?xml version="1.0" encoding="UTF-8"?>
<!--
~ -
~ ~ #%L
~ ~ Amazon AppFlow Custom Connector SDK.
~ ~
~ %%
~ Copyright (C) 2021 Amazon Web Services
~ ~
~ %%
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~      http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License 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.
~ #L%
~
-->

<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">
    <parent>
        <artifactId>aws-appflow-custom-connector</artifactId>
        <groupId>software.amazon.appflow</groupId>
        <version>1.0.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>custom-connector-example</artifactId>

    <properties>
        <aws-custom-connector-sdk.version>1.0</aws-custom-connector-sdk.version>
        <aws-custom-connector-queryfilter.version>1.0</aws-custom-connector-queryfilter.version>
        <aws-custom-connector-integ-test.version>1.0</aws-custom-connector-integ-test.version>
        <gson.version>2.8.6</gson.version>
        <commons-collections4.version>4.1</commons-collections4.version>
        <httpclient.version>4.5.13</httpclient.version>
        <httpcore.version>4.4.14</httpcore.version>
        <log4j.version>2.17.1</log4j.version>
        <aws-lambda-java-log4j2.version>1.5.1</aws-lambda-java-log4j2.version>
        <maven-shade-plugin.version>3.2.2</maven-shade-plugin.version>
        <json.version>20211205</json.version>
        <aws-secretsmanager-caching-java.version>1.0.1</aws-secretsmanager-caching-java.version>
        <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
        <log4j2-cachefile-transformer.version>2.13.0</log4j2-cachefile-transformer.version>
        <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>software.amazon.appflow</groupId>
            <artifactId>aws-custom-connector-sdk</artifactId>
            <version>${aws-custom-connector-sdk.version}</version>
        </dependency>
        <dependency>
            <groupId>software.amazon.appflow</groupId>
            <artifactId>aws-custom-connector-queryfilter</artifactId>
            <version>${aws-custom-connector-queryfilter.version}</version>
        </dependency>
        <dependency>
            <groupId>software.amazon.appflow</groupId>
            <artifactId>aws-custom-connector-integ-test</artifactId>
            <version>${aws-custom-connector-integ-test.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>${commons-collections4.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${httpcore.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j18-impl</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws.secretsmanager</groupId>
            <artifactId>aws-secretsmanager-caching-java</artifactId>
            <version>${aws-secretsmanager-caching-java.version}</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${json.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!--Uncommenting the below plugin will run the Integration Tests for custom connector.-->
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsafe-plugin.version}</version>
                <configuration>
                    <workingDirectory>salesforce-example-test-files</workingDirectory>
                    <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>-->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>${maven-shade-plugin.version}</version>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="com.github.edwgiz.maven_shade_plugin.log4j2_cache_transformer.PluginsCacheFileTransformer">
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.github.edwgiz</groupId>
                        <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
                        <version>${log4j2-cachefile-transformer.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven-dependency-plugin.version}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- configure the plugin here -->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
