Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample-apps/blank-java - run with maven #207

Open
rezadehganpour opened this issue Sep 27, 2020 · 2 comments
Open

sample-apps/blank-java - run with maven #207

rezadehganpour opened this issue Sep 27, 2020 · 2 comments

Comments

@rezadehganpour
Copy link

Hi there;
I would like to know how can I run blank-java application with maven since all the scripts that are provided are leveraging gradle.

Thanks

@bouhanef
Copy link

bouhanef commented Oct 21, 2020

The blank-java project is provided with both, Maven and Gradle. And it can be seen from the template.yml for Gradle and template-mvn.yml for Maven.
If you want to build the project locally using Maven, run the following command :

$ mvn clean package

it will build the project and then package it in a jar containig all dependencies under the target/ folder.
You can then use the generated jar to update the AWS Lambda function.

To do this, open your Lambda Function in the console and then update the jar.

Follow this link for more information about AWS Lambda deployment package in Java.

@bogdanb
Copy link

bogdanb commented Aug 26, 2021

I mean, sure, but the description in the README says that you need either Gradle or Maven, yet the instructions then only work if you have Gradle.

I see that some of the other examples (e.g. java-events) do have code in their 1/2/3... scripts that looks like they’re meant to work with Maven. But none of them have a “build-layer” command, and it’s not obvious how to do that with Maven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants