Example on how to use Maven to generate and build code for an Ecore/Genmodel file.
Go to file
2024-06-19 15:16:19 +02:00
.github/workflows Updates Maven to v3.9.8 2024-06-19 15:15:14 +02:00
org.example.model Updates Maven dependencies: Xtext, MWE2, exec-maven-plugin 2024-02-27 16:21:53 +01:00
.gitignore Adds the bin folder to the .gitignore file 2023-12-31 11:44:23 +01:00
LICENSE Adds the LICENSE 2023-12-31 11:20:28 +01:00
README.md Fixes a typo in README.md 2024-01-28 10:42:17 +01:00

Maven Ecore Modeling Example

This example shows how to generate and build code from an Ecore/Genmodel (Meta-)Model with Maven. It can be used to generate and compile the code from an Eclipse modeling project with the help of a CI pipeline and without the need to run Eclipse tasks manually.



Name Type Purpose
org.example.model Eclipse (plug-in) project Contains the Ecore and the Genmodel files to generate code from.
ci.yml File Example GitHub Actions configuration to build and push the project.
pom.xml File Maven configuration file that contains the project's configuration.
GenerateModel.mwe2 File MWE2 file to generate the source code from the Ecore/Genmodel file.

How to build

  • Generate code + build the project:
    $ mvn clean package
  • Build + install the project to the local .m2/ folder:
    $ mvn clean install
  • Change the version of the plug-in to a new semver (e.g., before publishing a new release):
    $ mvn versions:set -DnewVersion=0.0.2-SNAPSHOT


This project is licensed under the Eclipse Public License - v1.0 - see the LICENSE file for more details.