EMFT Texo: integrating Texo in your build process
So how to setup headless/build-integrated code generation?
Texo uses Eclipse for code formatting and import resolving. So, start by downloading an Eclipse version suitable for your build platform. Then install the Texo plugins in this Eclipse version through the Texo update site and put this Eclipse version somewhere on your build server.
As a second step choose a location on the build server where Texo can create a workspace and Java project. And last, place the model (ecore/xsd) files on the build server.
The parameters have the following meaning:
- eclipse: the eclipse installation location
- data: the workspace location
- projectName: the name of a Java project to use, see here for more information
- modelLocation: the location of the model files
- jpa: generate code with JPA annotations
- dao: generate a DAO layer
The generated code will be present in the Java project on your build server and can be copied/compiled from there.
Instead of using ANT, you can also execute headless code generation directly in Java.
That’s all, with these latest developments, code generation and your build process can be nicely tied together!