Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] How to catch maven compilation errors in m2e plugin?

On 7/25/2011 4:16 AM, Klaus Reimer wrote:
On 07/22/2011 02:06 PM, Vlad Tatavu wrote:
Do u pass in any exception instance when u call buildContext.addMessage() ?
No. There is no exception to throw. The JavaScript compiler which I use
internally (Closure Compiler) only returns a list of error messages. I
call addMessage for each of these error messages (With null for the
cause parameter) and if the list has at least one entry I throw a single
MojoFailureException to tell Maven that the build failed.


Try to associate the thrown exception with one of the BuildContext messages.

Vlad


Back to the top