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

    <parent>
        <groupId>net.sozal</groupId>
        <artifactId>stackwriter</artifactId>
        <version>0.0.1</version>
    </parent>

    <groupId>net.sozal</groupId>
    <artifactId>stackwriter-agent</artifactId>
    <name>stackwriter-agent</name>
    <version>0.0.1</version>

    <build>
        <finalName>${project.artifactId}</finalName>
    </build>

    <dependencies>
        <dependency>
            <groupId>net.sozal</groupId>
            <artifactId>stackwriter-api</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>aws-lambda-layer</id>
            <activation>
                <property>
                    <name>env.PROFILE</name>
                    <value>aws-lambda-layer</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.amazonaws</groupId>
                    <artifactId>aws-lambda-java-runtime-interface-client</artifactId>
                    <version>2.1.1</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>3.1.2</version>
                        <executions>
                            <execution>
                                <id>copy-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <outputDirectory>${project.build.directory}/libs</outputDirectory>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
