mvn archetype:generate -DarchetypeGroupId=org.faktorips -DarchetypeArtifactId=faktorips-maven-archetype -DarchetypeVersion=<version>
English Documentation
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)
Starting with Eclipse 2022-09 the archetype can now be used directly in Eclipse. |
Execution
Generation of the Faktor-IPS project
Execute in the command line:
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.
From Eclipse:
To create a FaktorIPS-Project click on File
→ New
→ Project…
→ Maven Project
. On the first wizard page make sure Create a simple project
is not checked. On the next page a filter can be used to select the faktorips-maven-archetype
and the desired version. The archetype version also determines the FaktorIPS version:
The next wizard page is used to specify basic parameters for your FaktorIPS project:
Finally, a few derived parameters are queried in the Eclipse console and confirmed with the keyboard:
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
-
IPS-IsJaxbSupport: true, if Faktor-IPS generates XML-Support either with (1)
ClassicJXB
or (2)JakartaXmlBinding
, 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)