MidPoint Customization With Maven Overlay Project
There are many ways how to customize midPoint behavior. MidPoint is designed with practicality in mind and therefore the most frequent customizations can be done by configuration. But it is not possible to make everything configurable. Some customizations needs extension or even modification of midPoint code.
This page describes how to set up and maintain an overlay project that contains midPoint customizations.
How Overlay Works?
Overlay projects takes midPoint binary distribution (
midpoint.war), extracts it, adds your customization to it and then repackages it again.
The customizations may be configuration files, web resources (HTML, CSS, images) and even Java code.
The overlay can also override stock midPoint files and classes and replace them with custom versions.
The overlay project is build using Apache Maven. As midPoint itself is built using Maven and midPoint development binaries are also distributed in Maven repositories this is a natural choice.
The overlay project contains only the customized files. There is no need to copy stock midPoint sources and even binaries. The Maven will download everything that it needs directly from Evolveum repositories. As the overlay project only contains customizations it can easily be maintained in a version control system.
Example Overlay Projects
Following overlay examples are maintained by midPoint team for demonstration and documentation purposes:
Basic Evolveum/midpoint-overlay-example - this one serves two purposes:
Evolveum/midpoint-custom-soap-service-wsdl with CXF-based SOAP web-service. This demonstrates overlay as a part of Maven multi-module project. README provides quick hints about using CXF for SOAP web-services on topics like WSDL vs code-first, WS-Security and how to use midPoint authorizations.
Evolveum/midpoint-custom-soap-service is simplified SOAP web-service using code-first approach using basic authentication from midPoint.
Finally there is Evolveum/midpoint-custom-rest-service showing REST service also implemented with CXF, but from version 4.2 also experimental (but much simpler) Spring MVC endpoint.
Development document is now part of the basic overlay example - see midPoint overlay development. It describes how to build and run the project (including IDE), how to develop against fresh snapshots, how the MidPoint Home Directory customizations and initial-objects customizations work.
The document also includes overlay upgrade notes (starting with upgrade to midPoint 4.1).