-
Notifications
You must be signed in to change notification settings - Fork 139
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
JavaMavenWorkflow fails Required target/classes directory was not produced from 'mvn package' #203
Comments
Hello. Is it resolved? |
Hi @alissonxavierosfglobal , as far as I understand, there is no work done on this yet. |
The problem is that the CodeUri referring the parent pom folder is also used as working directory in sam build. It would be useful to configure in the AWS Toolkit SAM options the base-dir options like in the CLI. Here is my workaround in vscode: In the template.yaml, set the CodeUri parameter to the local folder CodeUri: . Then, place the template.yaml close to the parent pom.xml (so that the parent and modules will be copied) and run the following command by replacing the module folder with one of the available one (the working directory to the aws lambda maven module so that sam could bind target classes and dependencies). sam build -s ./module\ -t ./template.yaml Prepare a event.json which contains the payload (body) of your lambda run the sam package sam local invoke -d 5870 -e ./event.json In vscode, add a debug configuration (Java attach to process) and setup like this : {
"type": "java",
"name": "Attach to Remote Program",
"request": "attach",
"hostName": "localhost",
"port": "5870"
} Go to debug and the the "Attach to Remote Program", now you can break anywhere in the java lambda code |
Description:
Steps to reproduce
sam build --use-container --template-file template.yaml
Observed result:
Expected result:
Build is successful after
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Project directory is as below:
only showing the relevant one, full project directory is at aws-sam branch
Contents of template.yaml:
The text was updated successfully, but these errors were encountered: