Skip to main content
Jump to: navigation, search


< VIATRA‎ | DeveloperDocumentation
Revision as of 08:28, 24 March 2016 by (Talk | contribs) (Update to VIATRA Query 1.2)

The VIATRA build system

VIATRA uses Maven/Tycho for continous integration builds.

Project structure


  • query: Querying EMF models (formerly EMF-IncQuery).
  • transformation: Transforming EMF models.
  • cep: Complex Event Processing framework.
  • dse: Design Space Exploration framework.
  • integration: Integrations with other technologies.
  • addon: Addons for implementing useful application functionality with VIATRA queries.

Each component has the following subdirectories:

  • plugins: The various plug-ins projects the component consists of.
  • features: Installable feature projects of the component.
  • tests: Plug-ins related to testing the component. They do not include tests with external dependencies.


  • releng: Release engineering projects:
    • org.eclipse.viatra.parent: Used as parent project for configuration inheritance.
    • Container projects for all submodules:
      • org.eclipse.viatra.parent.all: Root Maven project which contains all submodules.
      • org.eclipse.viatra.update.all: Builds a p2 update site from all submodules.
      • The target definition necessary for building all submodules.
    • Container projects for the "core" submodules which can be used outside of Eclipse:
      • org.eclipse.viatra.parent.core: Root project which contains the core submodules.
      • org.eclipse.viatra.update.core: Builds a p2 update site from the core submodules.
      • The target definition necessary for building the core submodules.
    • Oomph setup:
      • org.eclipse.viatra.setup: The setup files for setting up the development environments.
      • org.eclipse.viatra.generator: The generator MWE2 workflows used by the setup.
  • maven: VIATRA Maven plugins.
  • examples: Basic examples of various VIATRA features.
  • artwork: Logos in various formats.

Adding a new project to the build

There are two important things to configure for adding a new project to the build:

  1. In order to technically build the project, a build configuration needs to be created (and registered in the parent project).
    1. This consists of a single pom.xml file in the project root directory.
    2. And a module declaration in the parent pom.
  2. Add the created feature to either an existing or a new feature
    1. If an existing feature is used, the feature.xml has to be extended with the id of the new project.
    2. If a new feature is created, this feature is required to be registered both in the root project and in the update projects' category.xml file.
    3. In both cases, don't forget to add the source plugin to the SDK or another Sources feature.

An example commit for executing all these steps (with the creation of a new project) is: (Note that the addition of a source plugin is not included).

Defining the build configuration for a plug-in project

A project needs to have a pom.xml file in the project root for the build configuration. In most cases, this build configuration is very simple, as all required configurations are inherited either from the project type (Eclipse plug-in project) or parent project. Basically, there are two configuration types used in the project:

To create such a configuration file for a new project, the recommended solution is to copy an existing corresponding project configuration, and replace the plug-in identifier.

Warning! If a project for any reason uses a different version number than the base VIATRA project, it is important to add the version information to the project, replacing '.qualifier' with '-SNAPSHOT'.

Additionally, the new project needs to be added to the root project (org.eclipse.viatra.parent.all): The pom.xml file contains a modules section where a list of submodules are presented - it needs to be extended with a new submodule describing the project location.

Adding the plug-in to an existing feature

The existing feature.xml file has to be extended with the new plug-in as a contained plug-in id.

Currently most source plug-ins are installed with the SDK bundle, with the notable exceptions of Graphiti and GMF support plug-ins that can be installed by selecting the source features.

Adding the plug-in to a new feature

Creating a new feature project works similarly to creating a new plug-in project, but the feature builder pom.xml files are more simple. The recommended way of creating a new feature is to copy and existing one, and modifying the identifier, descriptions and contained plug-ins (and possibly features). The feature also needs to be registered into the root project's module section.

Additionally, this feature needs to be added to the update site. For this reason, the feature needs to be registered in the category.xml file stored in the update site project (the category.xml file has a form-based editor in PDE).

Back to the top