Installing MidPoint From Source Code

Last modified 09 Feb 2024 08:51 +01:00

This guide provides instruction for installing midPoint from the source code. It requires software development tools and some experience to build the product. This is recommended only for engineers that want to participate in midPoint development or have deeper interest in the source code. Everybody else will probably find installing distribution package or containers much easier.

MidPoint 4.0 and later

This guide applies to midPoint 4.0 and later. For guides that apply to older releases please see the release notes.

Before You Start

There are few things to check before you start the installation:

  • Make sure to see Release Notes for list of environments that are known to work and for the list of known issues in current release.

  • Make sure the System Requirements are met.

  • Development versions of midPoint are, quite obviously, not finished yet. There may be unfinished parts, bugs, instability and a variety of other problems. Use it at your own risk only.

Prerequisites

MidPoint is a Java application, therefore it requires Java platform to run on. Java 21 is a recommended platform for MidPoint 4.8.2. Alternatively, Java 17 can be used. Other Java platform versions are not supported. Java platform distributions based on OpenJDK are recommended. Other JDK builds (e.g. Oracle) may work as well, but those have limited support for midPoint (see release notes for the details).

JAVA_HOME environment variable should point to the Java installation path.

Please make sure you have full Java Development Kit (JDK), not just the runtime environment (JRE). Full set of development tools is needed, as you will be building midPoint from source code.

Git

The midPoint source is available from a Git server. You will need a suitable git client software to clone the source code. Many operating systems include that as a standard package. E.g. Debian-based Linux system can install it using apt:

sudo apt install git

Maven

MidPoint source code is built using Apache Maven.

Download and install Maven3: http://maven.apache.org/download.html

M2_HOME environment variable should point to the Maven installation path.

Installation

Getting The Source Code

MidPoint source code is hosted on GitHub:

GitHub project page

https://github.com/Evolveum/midpoint

Git repository HTTPS access

https://github.com/Evolveum/midpoint.git

Git repository SSH access

git@github.com:Evolveum/midpoint.git

Use your git client to clone the source code tree. For example, Linux system can use git command-line client:

git clone -b v4.8.2 https://github.com/Evolveum/midpoint.git

Running this command creates midpoint directory containing midPoint source code tree.

The -b option specifies midPoint version. You can ommit the option to get the latest development version of midPoint (master branch):

git clone https://github.com/Evolveum/midpoint.git

For more information about the source repository structure see Source Code.

On Windows, we highly recommend to add the following switch to the git clone command: --config core.autocrlf=false

Actually, you can use the switch on any platform. While in theory autocrlf works, it does not work well for midPoint projects. Don’t forget to adjust project settings for IDE accordingly (taken care of automatically when using IntelliJ IDEA).

Next to master branch there are available also support branches. After each release there is ready relevant support branch where are placed all the bug fixes until next release is done. It is working snapshot between releases.

These branches have the naming support-X.Y. E.g. for the LTS release 4.8(.x) there is support branch support-4.8.

Building MidPoint

Enter the directory with downloaded source code and execute either of the following commands:

mvn install

Complete build process also includes unit and integration tests, and it may take more than one hour. You can speed up the build by skipping automatic tests using the following command:

mvn install -DskipTests=true

After the successful build process there will be a binary distribution package located in dist/target directory.

Building the WAR file only

If the WAR file is all you need you can speed the build even further by skipping the packaging of the distribution archive. Use the following command to turn off the dist maven profile:

mvn clean install -DskipTests=true -P -dist

Please note the minus character (-) before profile name.
The resulting WAR file can be obtained from gui/admin-gui/target/midpoint.war

Running MidPoint

Continue with installation in the same way as for a binary release. See Installing MidPoint Server From Distribution Package page. However, you need to use your own freshly built distribution package from dist/target directory instead of downloading it.

Next Steps

MidPoint is a comprehensive system, and the source code is quite big. If you plan to work with midPoint source code, we strongly recommend getting an integrated development environment (IDE). Most midPoint developers are using IntelliJ IDEA and there is a short guide to set up IntelliJ IDEA for midPoint development. Eclipse Java IDE can also be used.

MidPoint is using embedded H2 database by default to store its data. The embedded H2 database is find for first steps with midPoint, demo environments, development and similar non-production purposes. It is not supported for any pre-production and production use. PostgreSQL database has to be used for any serious midPoint deployment. Please see native PostgreSQL repository page for installation details.

If you plan to participate in midPoint development, please see the Development Participation page. If you plan to contribute source code, the Code Contribution Guidelines page provides essential information.

Was this page helpful?
YES NO
Thanks for your feedback