Using Faktor-IPS Projects as Maven Dependencies


In many Java projects, Maven is used as a build tool and for dependency management. Therefore, it also makes sense to use Maven to map the dependencies between Faktor-IPS projects.


First of all, you need to copy some settings from the .ipsproject file into the manifest (META-INF/MANIFEST.MF) in all Faktor-IPS projects that are to be referenced by Maven. The settings are described in the
Documentation on using Faktor-IPS projects as OSGi bundles, in the META.INF/MANIFEST.MF section(German only).

Then in the .ipsproject file of all the referenced Faktor-IPS projects the IpsObjectPath should be adjusted. Instead of the previously referenced projects, an entry for the Maven-Classpath-Container has to be provided:

<Entry container="JDTClasspathContainer" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" reexported="false" type="container"/>

In addition, some settings in Maven are recommended, so that all the built JARs contain the required information.

  • The model or product folders should be added as resources unless they are in the usual Maven structure:
  • If the source code for the formulas is generated, then Maven must contain instruction to build it in the derived folder:
  • The handwritten MANIFEST must be used by Maven:

Creating Faktor-IPS Projects as Maven Projects

Since version 21.6, Faktor-IPS Projects can be directly created as Maven Projects using Maven Archetypes. More details can be found here.

Faktor-IPS-Build with Maven

With the Faktor-IPS Maven Plugin it is easy to setup a centralized build with a continuous integration server. Only the model and the source code have to be checked in. All other generated files (derived sources) are created on the build server. Thereby reducing error prone merge conflicts caused by different IDE settings and operating systems.

The documentation of the Factor-IPS Maven Plugin is automatically updated with each new version and can be found with this link: Faktor-IPS Maven Plugin