Bean shell enforcer swallows message
------------------------------------
Key: MENFORCER-18
URL: http://jira.codehaus.org/browse/MENFORCER-18
Project: Maven 2.x Enforcer Plugin
Issue Type: Improvement
Components: Standard Rules
Affects Versions: 1.0-alpha-3
Reporter: David Dossot
Assignee: Brian Fox
The message does not display in the console, because the original
EnforcerRuleException is wrapped into another one:
throw new EnforcerRuleException( this.message );
}
}
catch ( Exception e )
{
throw new EnforcerRuleException( "Unable to lookup a component", e
);
}
and the console does not display root causes (even with -e, the root cause does
not show), living us with "Unable to lookup a component" as an explanation of
the rule violation:
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building xxx
[INFO] task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory xxx
[INFO] [enforcer:enforce {execution: enforce-beanshell}]
[WARNING] Rule 0: org.apache.maven.plugin.enforcer.EvaluateBeanshell failed
with message: Unable to lookup a component
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Some Enforcer rules have failed. Look above for specific messages
explaining why the rule failed.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Oct 04 12:00:25 PDT 2007
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira