You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Tim Enderling (JIRA)" <ji...@apache.org> on 2013/05/21 23:26:21 UTC
[jira] [Updated] (EASYANT-54) Exceptions in initialization phase of
project are swallowed
[ https://issues.apache.org/jira/browse/EASYANT-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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: https://issues.apache.org/jira/browse/EASYANT-54
> 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: http://www.atlassian.com/software/jira