I'm launching a (legacy) Makefile with the exec-maven-plugin
However, if the Makefile fails, the exec-maven-plugin does NOT fail and the build continues and reports success
The maven log shows the following:
[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)
But then, Maven continues and it looks like the exec-maven-plugin is not seeing this as an error
How can I get the plugin to fail when the Makefile returns this error
The pom configuration is:
<!--
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>