Faktor-IPS Archetype

Motivation

Maven is a widely used tool for building and dependency management of projects. Faktor-IPS projects should therefore also be able to be created directly as Maven projects. This is possible using a Maven archetype for Faktor-IPS.

Requirements

  • Installation of the latest version of Faktor-IPS (21.6 or later)

  • Installation of Maven (at least version 3.5.0)

Does not work in Eclipse: Due to a bug in Eclipse the archetype can currently only be used from the command line. The created project can then be imported in Eclipse.

Execution

Generation of the Faktor-IPS project

Execute in the command line:

mvn archetype:generate -DarchetypeGroupId=org.faktorips -DarchetypeArtifactId=faktorips-maven-archetype -DarchetypeVersion=<version>

The required parameters are then queried. Most of the parameters are preset, but can be overwritten if necessary. Finally, a post-processor is automatically carried out, which makes adjustments and queries further parameters, if necessary. See Used parameters.

Building the Faktor-IPS project

Navigate to the generated project and execute maven in the command line:

mvn clean install

Used parameters

… for generating the project

  • groupId: the Group-ID of the Maven project

  • artifactId: the Artifact-ID of the Maven project

  • version: the version of the Maven project

  • package: the base package, e.g. org.faktorips.example

  • JavaVersion: the used Java version, e.g. 1.8 or 11

  • IPS-Language: the used language package (en or de)

  • IPS-NamingConvention: the used naming convention, e.g. FIPS, VAA or PM

  • IPS-IsModelProject: true, if it is a model project, else false

  • IPS-IsProductDefinitionProject: true, if it es a product definition project, else false

  • IPS-IsPersistentProject: true, if persistence is supported, else false

  • IPS-TocXML: the name of the repository-TOC excluding the file format, e.g. faktorips-repository-toc

  • IPS-ValidationMessageBundle: the name of the used Validation-Message-Bundle, e.g. validation-message

  • IPS-SourceFolder: the source folder, e.g.: model

  • IPS-IsGroovySupport: true, if Faktor-IPS Groovy should be supported, else false

  • runtime-ID-prefix: the used runtime-ID-prefix, e.g. lineOfBusiness. (important: do not forget the dot at the end)

  • IPS-ConfigureIpsBuild: true, if the faktorips-maven-plugin should be configured to build the project, else false

… for automatic post-processing

  • (optional) Persistence API the used technology for implementing persistence support, e.g. EclipseLink 2.5, Generic JPA 2.0, Generic JPA 2.1 or Jakarta Persistence 2.2 (requires: IPS-IsPersistentProject=true)