[
https://jira.codehaus.org/browse/MANTRUN-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=344497#comment-344497
]
Alan McShane edited comment on MANTRUN-182 at 4/9/14 11:05 AM:
---------------------------------------------------------------
Agree that the behaviour/documentation is misleading as "failOnError" = true
suggests the maven build will fail on an ant error.
Also agree it doesn't work 100%. We're using it to call scripts/executables
(doesn't need to be transportable) and builds are continuing on certain errors
but failing on others.
e.g. this continues (even though invalid arg and return code = 1)
<execution>
<id>create-update-keystore</id>
<phase>pre-clean</phase>
<configuration>
<failOnError>false</failOnError>
<target>
<!-- create/update the keystore -->
<echo message="Create/update the
keystore" level="info" />
<exec
executable="${client.path}/userstore">
<arg value="INVALID ARG!" />
<arg value="${keystoreName}" />
</exec>
<echo message="Output keystore
'${keystoreName}' info" level="info" />
...
e.g. this fails (missing executable)..maybe because this exception is trapped,
as mentioned by reporter
<execution>
<id>pre-clean</id>
<phase>pre-clean</phase>
<configuration>
<failOnError>false</failOnError>
<target>
<!-- create/update the keystore -->
<echo message="Create/update the
keystore" level="info" />
<exec
executable="${client.path}/EXE_THAT_DOES_NT_EXIST">
<arg value="SET" />
<arg value="${keystoreName}" />
</exec>
<echo message="Output keystore
'${keystoreName}' info" level="info" />
...
was (Author: alanmcshane):
Agree that the behaviour/documentation is misleading as "failOnError" = true
suggests the maven build will fail on an ant error.
Also agree it doesn't work 100%. We're using it to call scripts/executables
(doesn't need to be transportable) and builds are continuing on certain errors
but failing on others.
e.g. this passes (even though invalid arg and return code = 1)
<execution>
<id>create-update-keystore</id>
<phase>pre-clean</phase>
<configuration>
<failOnError>false</failOnError>
<target>
<!-- create/update the keystore -->
<echo message="Create/update the
keystore" level="info" />
<exec
executable="${client.path}/userstore">
<arg value="INVALID ARG!" />
<arg value="${keystoreName}" />
</exec>
<echo message="Output keystore
'${keystoreName}' info" level="info" />
...
e.g. this fails (missing executable)..maybe because this exception is trapped
<execution>
<id>pre-clean</id>
<phase>pre-clean</phase>
<configuration>
<failOnError>false</failOnError>
<target>
<!-- create/update the keystore -->
<echo message="Create/update the
keystore" level="info" />
<exec
executable="${client.path}/EXE_THAT_DOES_NT_EXIST">
<arg value="SET" />
<arg value="${keystoreName}" />
</exec>
<echo message="Output keystore
'${keystoreName}' info" level="info" />
...
> failOnError wrong documentation
> -------------------------------
>
> Key: MANTRUN-182
> URL: https://jira.codehaus.org/browse/MANTRUN-182
> Project: Maven Antrun Plugin
> Issue Type: Bug
> Affects Versions: 1.7
> Reporter: Pap Lőrinc
>
> <name>failOnError</name>
> <description>[...]If this value is 'true', the Maven build will proceed even
> if the ant build fails.
> If it is 'false', then the Maven build fails if the ant build
> fails.</description>
> (fail on error == true) means that if an error occurs the build will fail.
> The documentation states the opposite (and I'm not even sure that it's
> working, as my build fails with both options if the exec-ed file doesn't
> exist)
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)