-
Notifications
You must be signed in to change notification settings - Fork 791
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
Running archetype to generate maven lambda is failing #1981
Comments
Hi @michaelgman13 , I was not able to reproduce the issue. I found this answer on stackoverflow and thought it could be related https://stackoverflow.com/a/26758522 Could you check if you have write permission of the directory? |
@michaelgman13 were you able to try @zoewangg 's suggestion? |
@debora-ito , @zoewangg - I am facing the same issue. The exact same error logs mentioned above with -e flag. I have permission to read and write in the folder, I am running command prompt in admin mode so permissions should not be a problem here. |
Hi @nchauhan5, did you also run the command on windows? |
@zoewangg Yes |
Facing this problem as well. I can confirm this is not a filesystem read/write access issue by generating with a different archetype. mkdir -p /tmp/foo && cd /tmp/foo
# Fine
touch ok
# Fine
mvn archetype:generate -B \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DarchetypeVersion=1.1 \
-DgroupId=com.company \
-DartifactId=project \
-Dversion=1.0-SNAPSHOT \
mkdir -p /tmp/bar && cd /tmp/bar
# Fine
touch sure
# Failure
mvn archetype:generate \
-DarchetypeGroupId=software.amazon.awssdk \
-DarchetypeArtifactId=archetype-lambda \
-DarchetypeVersion=2.14.3 \
-DgroupId=com.test \
-DartifactId=sample-project \
-Dversion=1.0-SNAPSHOT \
-Dservice=s3 \
-Dregion=us-west-1 \
-DinteractiveMode=true \
--errors Two lines that look relevant from the output
What is Full output from failed command shown below Commandmvn archetype:generate \
-DarchetypeGroupId=software.amazon.awssdk \
-DarchetypeArtifactId=archetype-lambda \
-DarchetypeVersion=2.14.3 \
-DgroupId=com.test \
-DartifactId=sample-project \
-Dversion=1.0-SNAPSHOT \
-Dservice=s3 \
-Dregion=us-west-1 \
-DinteractiveMode=true \
--errors Output
|
Reproducing using docker run -it amazoncorretto:8u265-al2 /bin/bash
yum install -y maven
cd /tmp
mvn archetype:generate \
-DarchetypeGroupId=software.amazon.awssdk \
-DarchetypeArtifactId=archetype-lambda \
-DarchetypeVersion=2.14.3 \
-DgroupId=com.test \
-DartifactId=sample-project \
-Dservice=s3 \
-Dregion=US_WEST_2 \
-DinteractiveMode=false
|
@jason-riddle Thank you for providing detailed steps to reproduce the issue. I'm able to reproduce it using the docker image. We will look into the issue |
I think I found out the root cause. It seems the new release of In 3.2.0, the default
In 3.0.1, it is
We will need to investigate how to fix it. As a workaround, you can use the following command to enforce the use of older version of the archetype plugin
|
@zoewangg, what will be the command be, if instead of "archetype-lambda" archetypeArtifactId, I want to create a project with AWS Rekognition service as parts of the pom.xml |
@nchauhan5 You mean an archetype for a general application rather than Lambda function? We don't have one yet. Could you create a feature request? We will prioritize it if more people +1 on it. If you mean Lambda function, you can use the same command and change the |
happening here as well, using windows 10. note that this example is https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/setup-project-maven.html#create-maven-project |
Hi @fjleon1980, we are aware of this issue. Could you try with the workaround?
|
Hi @zoewangg, I was with the same problem and the workaround worked! |
Fixed via #2085 and released as part of With the latest version, now you don't need to specify the
|
This blog post should be updated to stop other folks trying to find the solution for this bug |
…ef07e8386 Pull request: release <- staging/56041e2f-715e-44b1-a45e-644ef07e8386
Describe the bug
I'm running the following command to try to generate a lambda maven project.
mvn "archetype:generate" "-DarchetypeGroupId=software.amazon.awssdk" "-DarchetypeArtifactId=archetype-lambda" "-DarchetypeVersion=2.11.4" "-DgroupId=com.amazon.test" "-DartifactId=test-project" "-Dservice=s3" "-Dregion=us-west-2" "-DinteractiveMode=false" -e
Expected Behavior
I think it should create the maven project successfully. Was following this page
Current Behavior
I got this error output:
Steps to Reproduce
Run mvn
"archetype:generate" "-DarchetypeGroupId=software.amazon.awssdk" "-DarchetypeArtifactId=archetype-lambda" "-DarchetypeVersion=2.11.4" "-DgroupId=com.michael.test" "-DartifactId=test-project" "-Dservice=s3" "-Dregion=us-west-2" "-DinteractiveMode=false" -e
in an empty directoryPossible Solution
Context
I'd like to use this archetype to generate lambda templates.
Your Environment
The text was updated successfully, but these errors were encountered: