我使用exec-maven-plugin启动(遗留)Makefile
但是,如果Makefile失败,exec-maven-plugin不会失败并且构建继续并报告成功
maven日志显示以下内容:
[INFO] Creating target /src/gateways/src/c++/smtp/smtp-logview/target/bin/logview
[INFO] /usr/bin/ld: cannot find -lstlport
[INFO] collect2: ld returned 1 exit status
[INFO] logview - 0 error(s), 0 warning(s)
但是,然后,Maven继续,看起来exec-maven-plugin看起来并不是一个错误
当Makefile返回此错误时,如何让插件失败
pom配置是:
<!--
Plugin for launching the Makefile to create smtp-logview .a lib
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>smtp-logview</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>/usr/bin/make</executable>
<workingDirectory>${basedir}/src/main/c++/com/compname/smtp/logview/</workingDirectory>
<arguments>
<argument>--file=logview.mak</argument>
<argument>clean</argument>
<argument>all</argument>
<argument>BASEDIR=${basedir}</argument>
<argument>TECHNOLOGY=${technology-directory}</argument>
<argument>TARGETDIR=${project.build.directory}</argument>
<argument>CS_CUSTOM_BUILD=${basedir}/custom.mak</argument>
<argument>SYS_LIB=${system-lib-directory}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>