ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Enderling (JIRA)" <>
Subject [jira] [Updated] (EASYANT-54) Exceptions in initialization phase of project are swallowed
Date Tue, 21 May 2013 21:26:21 GMT


Tim Enderling updated EASYANT-54:

    Attachment: EASYANT-54-EasyAnt-no-longer-swallows-exceptions-dur.patch

The attached patch is based on the current trunk (SVN revision 1480665).

It addresses the issue by the following changes:
In EasyAntEngine.initProject -- similar to EasyAntEngine.doBuild -- catch any {{RuntimeException}}
or {{Error}} and if one is catched, call the build finish listeners (including {{DefaultEasyAntLogger}})
and pass the exception, so it will be printed.

If desired, I can provide a simple testcase (although EasyAnt currently seems to lack regression
tests for actual features more urgently than regression tests to prevent re-breaking of defects).
> Exceptions in initialization phase of project are swallowed
> -----------------------------------------------------------
>                 Key: EASYANT-54
>                 URL:
>             Project: EasyAnt
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.9
>            Reporter: Tim Enderling
>         Attachments: EASYANT-54-EasyAnt-no-longer-swallows-exceptions-dur.patch
> BuildExceptions that are thrown when loading plugins during project initialization are
not printed out. EasyAnt will just stop without a clue. 
> An example of this can be found when using the {{parameter}} task directly inside the
project element of a plugin, like in clean-std (which is not a good style anyway, but one
of the places that I stumbled into):
> {code}
> <project name="org.apache.easyant.plugins#clean-std" xmlns:ea="antlib:org.apache.easyant">
>     <ea:core-version requiredrevision="[0.9,+]" />
>     <ea:parameter property="target" required="true" description="the target directory
to clean" />
>     <target name="clean-std:clean" description="clean project">
>         <echo message="Cleaning ${target}..." />
>         <delete dir="${target}" />
>     </target>
> </project>
> {code}
> If {{target}} is not set, the usual message from the {{parameter}} task will not be printed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message