aws-lambda-java-runtime-interface-client

Used in: 256 components

Overview

Description

The AWS Lambda Java Runtime Interface Client implements the Lambda programming model for Java

Snippets

<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>aws-lambda-java-runtime-interface-client</artifactId>
    <version>2.6.0</version>
</dependency>

Maven POM File

<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>
    <groupId>com.amazonaws</groupId>
    <artifactId>aws-lambda-java-runtime-interface-client</artifactId>
    <version>2.6.0</version>
    <packaging>jar</packaging>

    <name>AWS Lambda Java Runtime Interface Client</name>
    <description>
        The AWS Lambda Java Runtime Interface Client implements the Lambda programming model for Java
    </description>
    <url>https://aws.amazon.com/lambda/</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://aws.amazon.com/apache2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/aws/aws-lambda-java-libs.git</url>
    </scm>
    <developers>
        <developer>
            <name>AWS Lambda team</name>
            <organization>Amazon Web Services</organization>
            <organizationUrl>https://aws.amazon.com/</organizationUrl>
        </developer>
    </developers>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <jacoco.maven.plugin.version>0.8.12</jacoco.maven.plugin.version>
        <maven-install-plugin.version>2.4</maven-install-plugin.version>
        <maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
        <junit-jupiter.version>5.9.2</junit-jupiter.version>
        <maven-checkstyle-plugin.version>3.4.0</maven-checkstyle-plugin.version>
        <!--
            The test/integration/codebuild/buildspec.*.yml files will set -DmultiArch=false
            as a workaround for executing within Github Actions. At time of writing (2022-04-08) the
            integration tests, `make pr,` do not play nice with mixed `docker build`, `docker run`,
            when docker buildx+qemu is configured on Linux. So we'll test the multi-platform artifact build
            separately from the Runtime Interface Client functionality until we figure something else out.
        -->
        <multiArch>true</multiArch>
        <target_build_os/>
        <target_build_arch/>
        <ric.classifier/>
        <!--
            Some test/integration/codebuild/buildspec.*.yml files will set -DargLineForReflectionTestOnly=""
            as this is not supported by all flavors of java
        -->
        <argLineForReflectionTestOnly>--add-opens java.base/java.net=ALL-UNNAMED</argLineForReflectionTestOnly>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-lambda-java-core</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-lambda-java-serialization</artifactId>
            <version>1.1.2</version>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>4.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>mockwebserver</artifactId>
            <version>4.12.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>com.allogy.maven.wagon</groupId>
                <artifactId>maven-s3-wagon</artifactId>
                <version>1.2.0</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <version>${maven-install-plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <version>${maven-deploy-plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M9</version>
                <configuration>
                    <argLine>${argLineForReflectionTestOnly} ${argLine}</argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>${junit-jupiter.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>build-jni-lib-for-tests</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target name="Build JNI libraries for tests">
                                <exec executable="${project.basedir}/src/main/jni/build-jni-lib.sh"
                                      failonerror="true" logError="true">
                                    <arg value="${project.build.directory}"/>
                                    <arg value="false"/>
                                    <arg value="${target_build_os}"/>
                                    <arg value="${target_build_arch}"/>
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>build-jni-lib</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target name="Build JNI libraries">
                                <exec executable="${project.basedir}/src/main/jni/build-jni-lib.sh"
                                      failonerror="true" logError="true">
                                    <arg value="${project.build.directory}"/>
                                    <arg value="${multiArch}"/>
                                    <arg value="${target_build_os}"/>
                                    <arg value="${target_build_arch}"/>
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.amazonaws.services.lambda.runtime.api.client.AWSLambda</mainClass>
                            <addClasspath>true</addClasspath>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                    <classifier>${ric.classifier}</classifier>
                    <includes>
                        <include>com/</include>
                        <include>jni/*${ric.classifier}.so</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule>
                                    <element>PACKAGE</element>
                                    <limits>
                                        <limit>
                                            <counter>LINE</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <configLocation>build-tools/checkstyle.xml</configLocation>
                    <failOnViolation>true</failOnViolation>
                    <consoleOutput>true</consoleOutput>
                    <logViolationsToConsole>true</logViolationsToConsole>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>dev</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.3</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-nexus-staging</serverId>
                            <nexusUrl>https://aws.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ci-repo</id>
            <distributionManagement>
                <repository>
                    <id>ci-repo</id>
                    <url>${env.MAVEN_REPO_URL}</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>linux-x86_64</id>
            <properties>
                <target_build_os>linux</target_build_os>
                <target_build_arch>x86_64</target_build_arch>
                <ric.classifier>linux-x86_64</ric.classifier>
            </properties>
        </profile>
        <profile>
            <id>linux_musl-x86_64</id>
            <properties>
                <target_build_os>linux_musl</target_build_os>
                <target_build_arch>x86_64</target_build_arch>
                <ric.classifier>linux_musl-x86_64</ric.classifier>
            </properties>
        </profile>
        <profile>
            <id>linux-aarch64</id>
            <properties>
                <target_build_os>linux</target_build_os>
                <target_build_arch>aarch_64</target_build_arch>
                <ric.classifier>linux-aarch_64</ric.classifier>
            </properties>
        </profile>
        <profile>
            <id>linux_musl-aarch64</id>
            <properties>
                <target_build_os>linux_musl</target_build_os>
                <target_build_arch>aarch_64</target_build_arch>
                <ric.classifier>linux_musl-aarch_64</ric.classifier>
            </properties>
        </profile>
    </profiles>
</project>