【问题标题】:Non Readable Pom File - Maven不可读的 Pom 文件 - Maven
【发布时间】:2019-08-07 09:50:23
【问题描述】:

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

 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

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

pom 文件明显在那里!我该如何解决这个问题?

【问题讨论】:

    标签: java eclipse maven configuration pom.xml


    【解决方案1】:

    在 mvn 中使用 -f 选项时缺少对 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】:

      只是一个想法...您是否检查过执行 maven 命令的用户以及 maven 程序本身是否具有对您的 pom 文件的读/写访问权限?

      【讨论】:

        【解决方案3】:

        你试过mvn clean eclipse:clean吗?如果是,你可以在这里发布你的 pom.xml 吗?

        【讨论】:

        • 永远不要使用eclipse 目标。它们已被弃用。
        猜你喜欢
        • 2011-10-31
        • 2013-01-21
        • 2016-10-25
        • 2020-04-18
        • 1970-01-01
        • 2011-10-05
        • 2011-04-12
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多