Maven 构建错误 - SAP WebIDE MTA 应用程序

问题描述

我正在 SAP WebIDE 中开发一个包含两个模块的 MTA 应用程序。一个 html5 模块和一个 Java 模块(candidatereportmail)。 html5 模块构建良好,但是当它进入 Java 模块时,大约 4 周后出现以下错误。我没有更改 Java 模块中的任何内容,所以我很困惑为什么会突然出现这些错误

pom.xml 确实看起来不错,并且一直工作到现在,所以我怀疑也许一些用于构建的库可能不再存在了?但是我不会收到不同的错误消息吗?

有没有人遇到过类似的事情?非常感谢有关可能导致问题的一些提示

10:47:36 (Executor) [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.0.0:war (default-war) on project candidatereportmail: Error assembling WAR: /projects/candidatereport-1/candidatereportmail/pom.xml isn't a file. -> [Help 1]
10:47:36 (Executor) [ERROR] 
10:47:36 (Executor) [ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
10:47:36 (Executor) [ERROR] Re-run Maven using the -X switch to enable full debug logging.
10:47:36 (Executor) [ERROR] 
10:47:36 (Executor) [ERROR] For more information about the errors and possible solutions,please read the following articles:
10:47:36 (Executor) [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
10:47:36 (Executor) [2021-04-15 08:47:36] ERROR Could not build the "candidatereportmail" module: Could not execute the "mvn clean package" command: exit status 1
10:47:36 (Executor) make: *** [Makefile_20210415084718.mta:37: candidatereportmail] Error 1
10:47:36 (Executor) Error: Could not build the MTA project: Could not execute the "make -f Makefile_20210415084718.mta p=cf mtar= strict=true mode=" command: exit status 2
10:47:36 (MTA BUILD) The "Task for mta build" process finished with code 1
10:47:36 (MTA BUILD) Build of "candidatereport-1" Failed.

解决方法

因此,我的 pom.xml 部分中的以下两个属性导致在构建 Java 模块时出错:

<directory>${project.basedir}</directory>

似乎无法在根目录中构建应用程序 war,因此必须添加一个 /target(或某个其他文件夹)并最终成功。

<directory>${project.basedir}/target</directory>

还是很奇怪,因为它直到大约两周前才起作用......