aws-toolkit-jetbrains
aws-toolkit-jetbrains copied to clipboard
Maven Lambda debugging should support submodules
Your Environment
- OS: WINDOWS 10
- JetBrains product: IntelliJ IDEA
- JetBrains product version: 2022.1.2
- AWS Toolkit version:1.48-221
- SAM CLI version:2.7.18
- JVM/Python version:jdk8

Question
Build Failed
Error: Unable to find a supported build workflow for runtime 'java8'. Reason: None of the supported manifests '['build.gradle', 'build.gradle.kts', 'pom.xml']'
Is CodeUri wrong?
CodeUri should be pointing to the folder containing the pom.xml because SAM CLI will perform the mvn package for you.
CodeUrishould be pointing to the folder containing thepom.xmlbecause SAM CLI will perform themvn packagefor you.
[FATAL] Non-resolvable parent POM if the CodeUri is ../
CodeUrishould be pointing to the folder containing thepom.xmlbecause SAM CLI will perform themvn packagefor you.
[FATAL] Non-resolvable parent POM if add <relativePath>../pom.xml</relativePath> to POM
CodeUrishould be pointing to the folder containing thepom.xmlbecause SAM CLI will perform themvn packagefor you.
[FATAL] Non-resolvable parent POM if add <relativePath>../pom.xml</relativePath> to POM
That error sounds like an issue with your POM file
Otherwise, make sure paths are relative from the template file. The following work for me:
CodeUri: HelloWorldFunction
<project root>
/template.yaml
/HelloWorldFunction
pom.xml
CodeUri: .
<project root>
/HelloWorldFunction
pom.xml
template.yaml
CodeUri: ../
<project root>
/HelloWorldFunction
pom.xml
/src
template.yaml
Thanks,I have other question
I set

and local docker is running. But SAM Build has failed,samcli.local.docker.manager.DockerImagePullFailedException: Could not find amazon/aws-sam-cli-build-imamge-java8:latest image locally and failed to pull it from docker.
There is a typo -- imamge, should be image
There is a typo --
imamge, should beimage
I build succeeded but image was not found when invoke function,why it will build new image?

Build Succeeded
Built Artifacts : .aws-sam\build
Built Template : .aws-sam\build\template.yaml
...
Invoking AWSCloudWatchOnceEvery5MinutesLauncher::handleRequest (java8)
Image was not found.
Removing rapid images for repo amazon/aws-sam-cli-build-image-java8
Building image....................
Skip pulling image and use local one: amazon/aws-sam-cli-build-image-java8:rapid-1.53.0-x86_64.

That error sounds like an issue with your POM file
Otherwise, make sure paths are relative from the template file. The following work for me:
CodeUri: HelloWorldFunction<project root> /template.yaml /HelloWorldFunction pom.xml
CodeUri: .<project root> /HelloWorldFunction pom.xml template.yaml
CodeUri: ../<project root> /HelloWorldFunction pom.xml /src template.yaml
If my project is a parent-son maven project,I want to invoke son maven project. It shows "Non-resolvable parent POM if the CodeUri is ../" if the "CodeUri" point to son maven project. It will build all son maven project that not my expectation if the "CodeUri" point to parent maven project.
SAM scopes down the mount to what is specified in the CodeUri.
I don't think there is a way to only build the child project that you are targeting.