Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] template/generation error listening (other than watching STDOUT)
[Acceleo] template/generation error listening [message #917733] Thu, 20 September 2012 07:30 Go to previous message
Joel Gluth is currently offline 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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[Acceleo] How to load two models as input for generation?
Next Topic:How can i run Workflow from java code
Goto Forum:
  


Current Time: Tue May 21 23:19:23 EDT 2013

Powered by FUDForum. Page generated in 0.06179 seconds