Run MWE2 workflows for Xtext 2.0 in a Tycho build
Date: 2011-07-15 | Tagged: dsl, eclipse, java, programming
Cross-posted to: https://fsteeg.wordpress.com/2011/07/15/run-mwe2-workflows-for-xtext-2-0-in-a-tycho-build/
I've been doing some work on the Zest build to make the MWE workflow (which generates a bunch of files from an Xtext
grammar) part of the Tycho
build. I guess I just couldn't stand committing tons of changes after some very small tweaks to the grammar I did earlier today.
To hook the workflow into the Tycho build, I was basically able to use the info in the very good and detailed tutorial by Karsten Thoms
. To make it work for our specific project setup and for the latest Xtext version I still had to tweak some minor things, so I thought I'll do a quick writeup of what I have actually done to make it work. This assumes you already have an Xtext project and you're already building with Tycho in general. If not, check out the tutorial mentioned above.
To add the MWE workflow to the Tycho build, all I had to do was add a plugin repository in the parent pom
Add a plugin pointing to the MWE workflow file in the Xtext grammar project pom
And define the Xtext grammar project source folder as a resource directory:
When running mvn clean install
, the MWE workflow now runs as part of the grammar project build.