<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2010-2022 Evolveum and contributors
  ~
  ~ This work is dual-licensed under the Apache License 2.0
  ~ and European Union Public License. See LICENSE file for details.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!--
    See https://maven.apache.org/developers/conventions/code.html for recommended element order.
    -->

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>3.3.10</version>
        <!-- This parent also declares dependencies listed here:
        https://docs.spring.io/spring-boot/docs/2.7.3/reference/html/dependency-versions.html#dependency-versions
        Or for current version of Spring Boot:
        https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-dependency-versions.html
        -->
    </parent>

    <groupId>com.evolveum.prism</groupId>
    <artifactId>prism-parent</artifactId>
    <version>4.8.9</version>
    <packaging>pom</packaging>

    <name>Prism Project</name>
    <description>Parent Maven project for all Prism Maven sub-projects (sub-modules).</description>
    <organization>
        <name>evolveum</name>
        <url>https://www.evolveum.com</url>
    </organization>
    <licenses>
        <license>
            <name>Apache License v2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>tools</module>
        <module>infra</module>
    </modules>

    <scm>
        <connection>https://github.com/Evolveum/prism.git</connection>
        <developerConnection>git@github.com:Evolveum/prism.git</developerConnection>
        <url>https://github.com/Evolveum/prism.git</url>
    </scm>
    <issueManagement>
        <system>Atlassian JIRA</system>
        <url>https://jira.evolveum.com/browse/MID</url>
    </issueManagement>


    <distributionManagement>
        <repository>
            <id>evolveum-nexus</id>
            <name>Internal Releases</name>
            <url>https://nexus.evolveum.com/nexus/repository/releases/</url>
        </repository>
        <snapshotRepository>
            <id>evolveum-nexus</id>
            <name>Internal Snapshots</name>
            <url>https://nexus.evolveum.com/nexus/repository/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <!-- Build system options -->
        <!-- Encoding for both sources and resources -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.source.version>17</project.source.version>
        <project.build.locale>en_US</project.build.locale>
        <ansi.color>true</ansi.color>
        <verbose.jaxb2>false</verbose.jaxb2>
        <verbose.jaxws>false</verbose.jaxws>

        <!--suppress UnresolvedMavenProperty (for IDE development) -->
        <git.describe>${describe}</git.describe>

        <!-- JVM args for testing plugins, can be used to add profiling, etc. -->
        <surefire.args>-Xms512m -Xmx512m</surefire.args>
        <!-- Controls surefire config/redirectTestOutputToFile setting. -->
        <redirectTestOutputToFile>true</redirectTestOutputToFile>

        <!-- START of Spring Boot dependencies overrides (temporary/security fixes, revise regularly!) -->
        <!-- END of Spring Boot dependencies overrides -->

        <!-- Dependencies global versions -->
        <!-- <slf4j.version>1.7.36</slf4j.version> -->
        <!-- Non Spring Boot Dependencies -->
        <guice.version>4.2.1</guice.version>
        <xml.resolver.version>1.2</xml.resolver.version>
        <commons.io.version>2.18.0</commons.io.version>
        <guava.version>32.1.2-jre</guava.version>
        <testng.version>7.8.0</testng.version>
        <checkstyle.version>3.3.0</checkstyle.version>
        <classgraph.version>4.8.162</classgraph.version>
        <xerces.version>2.12.2</xerces.version>

        <plexus.container.version>1.7.1</plexus.container.version>
        <plexus.classworlds.version>2.6.0</plexus.classworlds.version>
        <maven.api.version>3.8.5</maven.api.version>
        <!-- With M6 we get [WARNING] Corrupted channel by directly writing to native stream in forked JVM 1, we will try later versions. -->
        <surefire.version>3.0.0-M5</surefire.version>
        <failsafe.version>3.0.0-M5</failsafe.version>

        <asciidoclet.version>1.5.6</asciidoclet.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.github.classgraph</groupId>
                <artifactId>classgraph</artifactId>
                <version>${classgraph.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <!--
            TODO: Originally in jdk-11 profile, consolidate, now, when JDK 8 is not needed anymore.
            In JDK 11 we want to get rid of xml-apis, that are covered by Java 9+.
            Comes with xerces/xalan, overrides many classes from other APIs (StAX, SAX) or JDK.
            But it contains DOM classes like org.w3c.dom.ElementTraversal that are available
            from JDK 9+, so we still need it with JDK 8, among others in schemadist-prism.
            BTW: 1.4 (from 2009) is NEWER version than 2.0.2 (2002)... what can you say...
            -->
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>${xerces.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>xml-apis</groupId>
                        <artifactId>xml-apis</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.codehaus.staxmate</groupId>
                <artifactId>staxmate</artifactId>
                <version>2.0.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>stax</groupId>
                        <artifactId>stax-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <!-- make this dependency explicit to detect conflicts with older versions -->
                <groupId>org.codehaus.woodstox</groupId>
                <artifactId>stax2-api</artifactId>
                <version>4.2.1</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.ccxjc</groupId>
                <artifactId>cc-xjc-plugin</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.15</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>1.10.0</version>
            </dependency>
            <!-- experimental -->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains</groupId>
                <artifactId>annotations</artifactId>
                <version>21.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <!-- version convergence setup for maven plugins; RECONSIDER after major upgrades of Boot/Maven -->
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <classifier>no_aop</classifier>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-container-default</artifactId>
                <version>${plexus.container.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-classworlds</artifactId>
                <version>${plexus.classworlds.version}</version>
            </dependency>
            <dependency>
                <groupId>logkit</groupId>
                <artifactId>logkit</artifactId>
                <version>2.0</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.sisu</groupId>
                <artifactId>org.eclipse.sisu.inject</artifactId>
                <version>0.3.5</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.sisu</groupId>
                <artifactId>org.eclipse.sisu.plexus</artifactId>
                <version>0.3.5</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.annotation</groupId>
                        <artifactId>javax.annotation-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring-framework.version}</version>
                <exclusions>
                    <!-- replaced with jcl-over-slf4j -->
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-jcl</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>xml-resolver</groupId>
                <artifactId>xml-resolver</artifactId>
                <version>${xml.resolver.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity-engine-core</artifactId>
                <version>2.3</version>
            </dependency>

            <dependency>
                <groupId>org.jvnet.jaxb2_commons</groupId>
                <artifactId>jaxb2-basics-runtime</artifactId>
                <version>1.11.1</version>
            </dependency>

            <dependency>
                <groupId>org.javasimon</groupId>
                <artifactId>javasimon-core</artifactId>
                <version>4.2.0</version>
            </dependency>

            <!-- Maven plugins -->
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${maven.api.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-component-annotations</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-classworlds</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-model</artifactId>
                <version>${maven.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-artifact</artifactId>
                <version>${maven.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${maven.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-archiver</artifactId>
                <version>3.5.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-container-default</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-component-annotations</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId> <!-- We do not want multiple SLF4J implementations -->
                        <artifactId>slf4j-jdk14</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.maven.shared</groupId>
                        <artifactId>maven-shared-utils</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-interpolation</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-archiver</artifactId>
                <version>4.2.5</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId> <!-- We do not want multiple SLF4J implementations -->
                        <artifactId>slf4j-jdk14</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Used by maven-plugin-api in schema-dist-maven-plugin -->
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
                <version>3.3.0</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-io</artifactId>
                <version>3.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-interactivity-api</artifactId>
                <version>1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-classworlds</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>3.6.1</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>4.4</version>
            </dependency>

            <!-- Test support dependencies -->
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
            </dependency>
            <dependency>
                <groupId>com.evolveum.commons</groupId>
                <artifactId>test-ng</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <version>4.10.1</version>
            </dependency>

            <dependency>
                <groupId>jakarta.xml.ws</groupId>
                <artifactId>jakarta.xml.ws-api</artifactId>
                <version>3.0.1</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.jws</groupId>
                <artifactId>jakarta.jws-api</artifactId>
                <version>3.0.0</version>
                <scope>runtime</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- We don't want any dependencies in parent POM. -->

    <repositories>
        <repository>
            <id>evolveum</id>
            <name>Evolveum Public Releases</name>
            <url>https://nexus.evolveum.com/nexus/repository/public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>evolveum-snapshots</id>
            <name>Evolveum Snapshots</name>
            <url>https://nexus.evolveum.com/nexus/repository/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>

        <repository>
            <id>spring-milestone</id>
            <name>Spring Milestone Repository</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>evolveum</id>
            <name>Evolveum</name>
            <url>https://nexus.evolveum.com/nexus/repository/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.lukegb.mojo</groupId>
                <artifactId>gitdescribe-maven-plugin</artifactId>
                <version>3.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>gitdescribe</goal>
                        </goals>
                        <id>git-describe</id>
                        <phase>initialize</phase>
                        <configuration>
                            <outputPrefix></outputPrefix>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <skipIfEmpty>true</skipIfEmpty>
                    <archive>
                        <manifestEntries>
                            <Version-Number>${project.version}</Version-Number>
                            <SCM-Revision>${git.describe}</SCM-Revision>
                            <Organization>Evolveum</Organization>
                            <Organization-URL>https://www.evolveum.com</Organization-URL>
                            <Bugtracking-System>https://jira.evolveum.com</Bugtracking-System>
                            <License>dual-licensed under the Apache License 2.0 and European Union Public License</License>
                            <License-URL>https://www.apache.org/licenses/LICENSE-2.0.txt and https://joinup.ec.europa.eu/collection/eupl/eupl-text-11-12</License-URL>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>3.0.1</version>
                <!-- Used in system-init module. -->
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.3</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.6</version>
                                </requireMavenVersion>
                                <dependencyConvergence/>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- both replaced by org.slf4j:jcl-over-slf4j -->
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <exclude>org.springframework:spring-jcl</exclude>
                                        <!--
                                        jaxb-core replaced by Glassfish jaxb-runtime + txw2
                                        jaxb-xjc replaced by Glassfish jaxb-xjc + xsom + codemodel
                                        -->
                                        <exclude>com.sun.xml.bind:*</exclude>
                                        <!-- in favor of jakarta.xml.bind:jakarta.xml.bind-api -->
                                        <exclude>javax.xml.bind:jaxb-api</exclude>
                                        <!-- in favor of jakarta.activation:jakarta.activation-api -->
                                        <exclude>javax.activation:javax.activation-api</exclude>
                                        <!-- in favor of com.sun.activation:jakarta.activation -->
                                        <exclude>com.sun.activation:javax.activation</exclude>
                                        <exclude>javax.activation:activation</exclude>
                                        <!-- in favor of jakarta.annotation:jakarta.annotation-api -->
                                        <exclude>javax.annotation:javax.annotation-api</exclude>
                                        <!-- package with multiple XML APIs, conflicts assured -->
                                        <exclude>xml-apis:xml-apis</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.3.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>9.1</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <ignoreNonCompile>true</ignoreNonCompile>
                            <ignoredUnusedDeclaredDependencies>
                                <!--
                                We don't want anything here, except for test support...
                                In case of false report, check that the dependency is not used only in unused imports.
                                -->
                                <ignoredUnusedDeclaredDependency>org.assertj:assertj-core</ignoredUnusedDeclaredDependency>
                            </ignoredUnusedDeclaredDependencies>
                            <ignoredUsedUndeclaredDependencies>
                                <!--
                                TODO: Experimental proposal for midpoint packages, but if there is no disagreement, just delete this todo in 2021 :-)
                                Anything from midPoint is in one version, no conflict should occur and there is no real
                                need to declare transitive dependencies (e.g. *-impl implying *-api, etc.).
                                -->
                                <ignoredUsedUndeclaredDependency>com.evolveum.midpoint.*:*</ignoredUsedUndeclaredDependency>

                                <!-- Testing dependencies are not troubling us from. -->
                                <ignoredUsedUndeclaredDependency>org.testng:testng</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.assertj:assertj-core</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.javasimon:javasimon-core</ignoredUsedUndeclaredDependency>

                                <!-- Unreliable detection -->
                                <ignoredUsedUndeclaredDependency>javax.xml.bind:jaxb-api</ignoredUsedUndeclaredDependency>

                                <!-- the latter is superset of API and this totally confuses dep analyzer-->
                                <ignoredUsedUndeclaredDependency>jakarta.activation:jakarta.activation-api</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>com.sun.activation:jakarta.activation</ignoredUsedUndeclaredDependency>

                                <!-- Needs too many exclusions, used by apache-cxf (xjc plugin, prism-impl, schema, ..) -->
                                <ignoredUsedUndeclaredDependency>jakarta.xml.bind:jakarta.xml.bind-api</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.glassfish.jaxb:xsom</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.glassfish.jaxb:jaxb-runtime</ignoredUsedUndeclaredDependency>

                                <!-- Falsely reported, not used explicitly, only transient dependency. -->
                                <ignoredUsedUndeclaredDependency>org.slf4j:jcl-over-slf4j</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.slf4j:slf4j-api</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.danekja:jdk-serializable-functional</ignoredUsedUndeclaredDependency>
                                <ignoredUsedUndeclaredDependency>org.apache.tomcat.embed:tomcat-embed-core</ignoredUsedUndeclaredDependency>
                            </ignoredUsedUndeclaredDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>8.43</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!--suppress MavenModelInspection: provided by mvn(w)/IDE/Jenkins -->
                    <configLocation>${maven.multiModuleProjectDirectory}/config/checkstyle/checkstyle.xml</configLocation>
                    <!--suppress MavenModelInspection: provided by mvn(w)/IDE/Jenkins -->
                    <suppressionsLocation>${maven.multiModuleProjectDirectory}/config/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                    <includes>**/*.java</includes>
                    <!-- Also need to add suffixes to checkstyle.xml -->
                    <resourceIncludes>**/*.properties,**/*.xml,**/*.xsd,**/*.wsdl,**/*.json,**/*.yaml,**/*.yml</resourceIncludes>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.10.1</version>
                    <configuration>
                        <source>${project.source.version}</source>
                        <target>${project.source.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>com.rimerosolutions.maven.plugins</groupId>
                    <artifactId>wrapper-maven-plugin</artifactId>
                    <version>0.0.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                    <!--
                    With 3.0.0-M1 javadoc module fails with:
                    The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'.
                    -->
                    <!--<version>3.0.0-M1</version>-->
                    <configuration>
                        <deployAtEnd>true</deployAtEnd>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <executions>
                        <execution>
                            <id>default-test</id> <!-- unit tests -->
                            <phase>test</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <parallel>false</parallel>
                        <forkCount>1</forkCount>
                        <reuseForks>true</reuseForks>
                        <redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
                        <trimStackTrace>false</trimStackTrace>
                        <!-- See https://issues.apache.org/jira/browse/SUREFIRE-1588 -->
                        <useSystemClassLoader>false</useSystemClassLoader>
                        <systemPropertyVariables>
                            <javax.net.ssl.trustStore>src/test/resources/truststore.jks</javax.net.ssl.trustStore>
                            <midpoint.home>target/midpoint-home</midpoint.home>
                            <java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties
                            </java.util.logging.config.file>
                        </systemPropertyVariables>
                        <argLine>${surefire.args}</argLine>
                        <suiteXmlFiles>
                            <suiteXmlFile>testng-unit.xml</suiteXmlFile>
                        </suiteXmlFiles>
                        <properties>
                            <property>
                                <name>suitename</name>
                                <value>Unit</value>
                            </property>
                            <property>
                                <name>listener</name>
                                <value>
                                    com.evolveum.midpoint.tools.testng.TestListener,com.evolveum.midpoint.tools.testng.RetryListener
                                </value>
                            </property>
                        </properties>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-testng</artifactId>
                            <version>${surefire.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.5</version>
                    <configuration>
                        <effort>Max</effort>
                        <threshold>Low</threshold>
                        <xmlOutput>true</xmlOutput>
                        <onlyAnalyze>com.evolveum.midpoint.*</onlyAnalyze>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <configuration>
                    <!--suppress MavenModelInspection: provided by mvn(w)/IDE/Jenkins -->
                    <configLocation>${maven.multiModuleProjectDirectory}/build-system/checkstyle-configs/checkstyle.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
