<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">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.dataspray</groupId>
        <artifactId>aws-cdk</artifactId>
        <version>1.0.2</version>
    </parent>

    <artifactId>aws-cdk-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <name>AWS CDK Maven Plugin</name>
    <description>
        The AWS CDK Maven plugin produces and deploys CloudFormation templates based on the cloud infrastructure defined
        by means of CDK. The goal of the project is to improve the experience of Java developers while working with
        CDK by eliminating the need for installing Node.js and interacting with the CDK application by means of CDK
        Toolkit.
    </description>

    <dependencies>
        <!-- Maven Dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven.tools.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- AWS Dependencies -->

        <dependency>
            <groupId>software.amazon.awscdk</groupId>
            <artifactId>core</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>cloudformation</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>s3</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>sts</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>route53</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>ec2</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>ssm</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>ecr</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>elasticloadbalancingv2</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Other Dependencies -->

        <dependency>
            <groupId>io.dataspray</groupId>
            <artifactId>aws-cdk-maven-plugin-api</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dataspray</groupId>
            <artifactId>aws-cdk-maven-plugin-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dataspray</groupId>
            <artifactId>aws-cdk-cloud-manifest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-exec</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr353</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>

        <!-- Test Dependencies -->

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <configuration>
                    <skipInstallation>${skipITs}</skipInstallation>
                    <skipInvocation>${skipITs}</skipInvocation>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <pomIncludes>
                        <pomInclude>*/pom.xml</pomInclude>
                    </pomIncludes>
                    <preBuildHookScript>setup</preBuildHookScript>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <streamLogs>true</streamLogs>
                    <addTestClassPath>true</addTestClassPath>
                    <environmentVariables>
                        <AWS_REGION>us-east-1</AWS_REGION>
                    </environmentVariables>
                    <mavenOpts>
                        -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
                    </mavenOpts>
                    <goals>
                        <goal>clean</goal>
                        <goal>deploy</goal>
                    </goals>
                    <parallelThreads>8</parallelThreads>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>3.0.12</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>
