Reputation: 557
I'm very new to the AWS SDK for Java. I'm trying to get started with the AWS SDK for Java 2.x following the documentation here (https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html#get-started-projectsetup)
But when I tried to create a project as mentioned here using the following command
mvn -B archetype:generate \-DarchetypeGroupId=org.apache.maven.archetypes \-DgroupId=com.example.myapp \-DartifactId=myapp
I'm getting an error:
PS C:\Users\robert\Desktop> mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.example.myapp -DartifactId=myapp
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.100 s
[INFO] Finished at: 2021-08-09T12:26:24-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\robert\Desktop). Please verify you invoked Maven from
the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectExceptio
How to create a maven project and get started with aws sdk?
Upvotes: 1
Views: 295
Reputation: 17535
In Powershell you can't have the period (dot or full stop character) in your command line arguments. The instructions on that page lack this information and assume either a Unix-like environment or the cmd
environment. You should run:
mvn -B archetype:generate "-DarchetypeGroupId=org.apache.maven.archetypes" "-DgroupId=com.example.myapp" -DartifactId=myapp
Upvotes: 1
Reputation: 10734
Do you have / chars in the command. If so, you need to use this command:
mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.example.myapp -DartifactId=myapp
I'm using JDK 1.8 and this command is successful.
Upvotes: 1