首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >AWS SDK for Java入门

AWS SDK for Java入门
EN

Stack Overflow用户
提问于 2021-08-09 16:59:05
回答 2查看 57关注 0票数 1

我对AWS SDK for Java非常陌生。我正在尝试按照这里的文档(https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html#get-started-projectsetup)开始使用用于Java2.x的AWS SDK。

但是当我尝试使用下面的命令创建这里提到的项目时

代码语言:javascript
运行
复制
mvn -B archetype:generate \-DarchetypeGroupId=org.apache.maven.archetypes \-DgroupId=com.example.myapp \-DartifactId=myapp

我收到一个错误:

代码语言:javascript
运行
复制
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

如何创建maven项目并开始使用aws sdk?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-08-09 17:14:00

命令中是否有/字符。如果是这样,您需要使用以下命令:

代码语言:javascript
运行
复制
   mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.example.myapp -DartifactId=myapp

我正在使用JDK 1.8,这个命令是成功的。

票数 1
EN

Stack Overflow用户

发布于 2021-08-09 18:07:11

在Powershell中,命令行参数中不能有句点(点或句号)。该页面上的说明缺少这些信息,并假设使用类Unix环境或cmd环境。你应该运行:

代码语言:javascript
运行
复制
mvn -B archetype:generate "-DarchetypeGroupId=org.apache.maven.archetypes" "-DgroupId=com.example.myapp" -DartifactId=myapp
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68715871

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档