<!--
  ~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you 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.
  -->

<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>
        <groupId>org.ballerinax.awslambda</groupId>
        <version>1.2.64</version>
        <relativePath>../pom.xml</relativePath>
        <artifactId>awslambda-extension-parent</artifactId>
    </parent>

    <groupId>org.ballerinax.awslambda</groupId>
    <version>1.2.64</version>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>awslambda-extension</artifactId>
    <packaging>jar</packaging>
    <name>Ballerina AWSLambda Extension</name>
    <url>http://ballerinalang.org</url>

    <dependencies>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>lib-creator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-time</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-cache</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-reflect</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-task</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-auth</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-log-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-runtime-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-encoding</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-math</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-mime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-crypto</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ballerinalang</groupId>
            <artifactId>ballerina-system</artifactId>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>wso2.releases</id>
            <name>WSO2 Releases Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>
        <repository>
            <id>wso2.snapshots</id>
            <name>WSO2 Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>ballerina/**</exclude>
                </excludes>
            </resource>

            <!-- copy built-in ballerina sources to the jar -->
            <resource>
                <directory>${generated.ballerina.source.directory}</directory>
                <targetPath>META-INF/ballerina</targetPath>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${wso2.maven.compiler.source}</source>
                    <target>${wso2.maven.compiler.target}</target>
                </configuration>
            </plugin>

            <!-- For ballerina annotation processing -->
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <configuration>
                    <processors>
                        <processor>org.ballerinalang.codegen.BallerinaAnnotationProcessor</processor>
                    </processors>
                    <options>
                        <nativeEntityProviderPackage>org.ballerinax.awslambda.generated.providers</nativeEntityProviderPackage>
                        <nativeEntityProviderClass>StandardNativeElementProvider</nativeEntityProviderClass>
                    </options>
                </configuration>
                <executions>
                    <execution>
                        <id>process</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <phase>generate-sources</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
