[midPoint] REL 3.3 initial-objects

Radovan Semancik radovan.semancik at evolveum.com
Mon Dec 7 15:00:51 CET 2015


Hi,

On 12/07/2015 01:12 PM, Jens Breitenstein wrote:
> I am searching for the easiest way to introduce xml-defined roles like 
> the midpoint own roles located in "initial-objects".
> First thing I am confused about is that all roles are duplicated and 
> exist in two different modules (admin-gui and midpoint-config). What 
> about having a new maven-module which contains the xml-definitions 
> only once and all other modules reference it as simple artifact 
> dependency?

I thought about it. But that would make the source-tree readability 
worse for non-developers. Maven is not the easiest thing to read if you 
are not Java expert.

The "config" is in fact not even a maven module. It is a plain directory 
that contains files that are manually maintained. The "config" directory 
actually makes sense only for the midPoint releases. E.g. the upgrade 
SQL files are updated only when needed, usually only before the release. 
It is difficult to integrate that into the build in a generic way. And 
we have decided that the benefits are not worth the effort and it is OK 
to maintain that manually. It is not a big problem.

> At first glance it looks like that introduction of new roles is only 
> possible by adding them to the sources and rebuild the project.
> Is there a more elegant solution I just missed?

I'm not sure about this. The "import" directory in the midpoint home was 
meant for this purpose. But I'm not sure if it works. We have a partner 
that imported the objects using REST API. That definitely works.

> At the moment I am working around it by using a "initial-subjects" 
> folder in "midpoint-home" which is also read on startup (drawback: 
> requires a minor patch in "InitialDataImport.java").

Maybe you can make it work with the "import" directory and contribute 
the patch back to the project? Just use the pull request git process for 
the contributions. We would be happy to accept it.

-- 
Radovan Semancik
Software Architect
evolveum.com



More information about the midPoint mailing list