Skip to main content
Jump to: navigation, search


Maven integration

Version 0.8.0 of EMF-IncQuery supports building IncQuery projects in a Maven-based builds by generating the pattern matcher code from the eiq files.

Known limitations:

  • bug 434794 - Code generation for integration components (e.g. validation framework, derived features) is not supported.
  • bug 443715 - Maven compiler does not work if EMF code is in the same project as the queries.
  • The EMF-IncQuery project is not available from Maven Central.
  • There is no maven archetype support: it is not possible to generate an eclipse-less project automatically, that works with IncQuery. However, manually created projects can be built with the existing compiler.


Maven components are available from the Eclipse maven repository with the following url:

It includes both snapshot and release versions.

The following three maven-projects should be used:

  1. org.eclipse.incquery:incquery-runtime - dependency for the IncQuery runtime, without support for generic API
  2. org.eclipse.incquery:incquery-patternlanguage - dependency for the IncQuery with support for generic API (requires many more dependencies - only use if required)
  3. org.eclipse.incquery:incquery-maven-plugin - maven code generator


The maven plugin requires information from the used EMF packages and additionally the EMF packages should be able loaded as well. For this reason, it is important to add references to EPackages and Genmodels together with the corresponding dependencies.

Example generator (based on school example):

<!-- Using maven-clean-plugin to remove previously generated code -->
            <!-- Generated code folder -->
<!-- Setting up generator -->
  <!-- Binding execution to the code generation lifecycle phase -->
    <!-- Output directory - required -->
          <!-- Java class for the EMF EPackage -->
          <!-- genmodel file used for generating the EMF model classes -->
    <!-- Dependency required for the school project (that contains the generated EPackage) -->

Back to the top