不可读取的Pom文件-Maven

时间:2019-03-16 13:39:45

标签: java eclipse maven configuration pom.xml

我一直在构建一个没有问题的项目,但是突然遇到了这个错误。我试图重新制作工作区,现在每次都遇到相同的错误。我正在尝试使用Maven在Eclipse Che中简单地构建和运行项目。

 Build command --> mvn clean install -f ${current.project.path}

很好。

 Run command --> mvn exec:java -Dexec.mainClass="crawler.WebInterface" -Dexec.args="${current.project.path}/database ${current.project.path}/www" -f ${current.project.path}

现在我在运行项目时遇到错误。

    [INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /projects/555-hw2
: /projects/555-hw2
 (No such file or directory) @ 
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project  (/projects/555-hw2
[ERROR]   ) has 1 error
[ERROR]     Non-readable POM /projects/555-hw2
[ERROR]     : /projects/555-hw2
[ERROR]     (No such file or directory)
[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/ProjectBuildingException

同时,如果我们查看我的目录

enter image description here enter image description here

pom文件显然存在!我该如何解决?

3 个答案:

答案 0 :(得分:0)

只是一个主意...您是否检查了正在执行maven命令的用户,并且maven程序本身具有对pom文件的读/写访问权限?

答案 1 :(得分:0)

在将-f选项与mvn一起使用时,您缺少对pom文件的引用

尝试

Run command --> mvn exec:java -Dexec.mainClass="crawler.WebInterface" -Dexec.args="${current.project.path}/database ${current.project.path}/www" -f ${current.project.path} youPomFile.xml

答案 2 :(得分:-1)

您尝试过mvn clean eclipse:clean吗?如果是,您可以在此处发布pom.xml吗?