| [Acceleo] template/generation error listening [message #917733] |
Thu, 20 September 2012 07:30  |
Joel Gluth Messages: 5 Registered: May 2012 |
Junior Member |
|
|
I have a relatively large Acceleo component that functions as a Maven plugin. It's pretty useful, but one of the things that would make it better is having my Maven build fail if generation raises exceptions.
For example,
org.eclipse.acceleo.engine.AcceleoEvaluationException: Invalid loop iteration at line 46 in Module java for block for (getOwnedContraintInPackage(ownedAttribute,Bag {'constraints'})). Last recorded value of self was org.eclipse.uml2.uml.internal.impl.PropertyImpl@484d3500 (name: searchTerm, visibility: <unset>) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none). Problem found while generating the file 'D:\Projects\whatever-proxy\target\generated-sources\java\com\whatever\forms\SomethingSearchForm.java'.
at java.generateValidationConstraints(Property)(java.mtl:46)
at java.generateValidationConstraints(Property)(java.mtl:45)
turns up in my STDOUT, and is definitely a failure. However, I can't find a way to listen for this happening - no exception gets thrown to or by my Generate class, which I'm wrapping in the Maven task.
Monitor and IAcceleoTextGenerationListener do not seem to have quite the capacity I want, though it's entirely possible I'm reading the API wrong.
How can I listen for these kinds of event?
[Updated on: Thu, 20 September 2012 11:19] Report message to a moderator
|
|
|