Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/393.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java sam build无法找到pom.xml文件_Java_Amazon Web Services_Maven_Aws Sam Cli_Aws Sam - Fatal编程技术网

Java sam build无法找到pom.xml文件

Java sam build无法找到pom.xml文件,java,amazon-web-services,maven,aws-sam-cli,aws-sam,Java,Amazon Web Services,Maven,Aws Sam Cli,Aws Sam,我有一个Maven项目,它有一个模块“AddUser”。该模块基本上是一个sam应用程序。 尝试从项目根路径运行命令“sam build”时。我得到以下错误:- in-iftekhar-04eb:UserPlanning iftekhar.khan$ sam build 2019-07-14 16:55:00 Building resource 'AddUserFunction' 2019-07-14 16:55:00 Running JavaMavenWorkflow:Copy

我有一个Maven项目,它有一个模块“AddUser”。该模块基本上是一个sam应用程序。 尝试从项目根路径运行命令“sam build”时。我得到以下错误:-

in-iftekhar-04eb:UserPlanning iftekhar.khan$ sam build
    2019-07-14 16:55:00 Building resource 'AddUserFunction'
    2019-07-14 16:55:00 Running JavaMavenWorkflow:CopySource
    2019-07-14 16:55:00 Running JavaMavenWorkflow:MavenBuild

    Build Failed
    Error: JavaMavenWorkflow:MavenBuild - Maven Failed: [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  0.054 s
    [INFO] Finished at: 2019-07-14T16:55:01+05:30
    [INFO] ------------------------------------------------------------------------
    [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/private/var/folders/f8/jgg9tzq97q39c_c2z1sn4blm0000gn/T/tmprn_uvw70). 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/MissingProjectException
完整的代码可在此处找到-

有谁曾经遇到过类似的问题,能在这方面帮助我吗


谢谢

我有这个问题。首先我运行了
mvn clean install
,然后我更改了SAM模板,使其不指向jar,而是指向
pom.xml
文件的位置,如下所示:

CodeUri:。


然后运行
sambuild

将pom和模块配置文件直接添加到帖子中