Open hongbofan opened 1 year ago
CodeUri
should be pointing to the folder containing the pom.xml
because SAM CLI will perform the mvn package
for you.
CodeUri
should be pointing to the folder containing thepom.xml
because SAM CLI will perform themvn package
for you.
[FATAL] Non-resolvable parent POM if the CodeUri is ../
CodeUri
should be pointing to the folder containing thepom.xml
because SAM CLI will perform themvn package
for you.
[FATAL] Non-resolvable parent POM if add
CodeUri
should be pointing to the folder containing thepom.xml
because SAM CLI will perform themvn package
for you.
[FATAL] Non-resolvable parent POM if add
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.
Your Environment
Question
Is CodeUri wrong?