<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Hibernate Search, full-text search for your domain model
 ~
 ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later
 ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  -->
<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 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.hibernate.search</groupId>
    <artifactId>hibernate-search-parent</artifactId>
    <version>6.0.2.Final</version>
    <packaging>pom</packaging>

    <name>Hibernate Search Root POM</name>
    <description>Hibernate Search Root POM</description>

    <url>http://hibernate.org/search/</url>

    <inceptionYear>2006</inceptionYear>

    <issueManagement>
        <system>JIRA</system>
        <url>https://hibernate.atlassian.net/browse/HSEARCH</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/hibernate/hibernate-search.git</connection>
        <developerConnection>scm:git:git@github.com:hibernate/hibernate-search.git</developerConnection>
        <url>http://github.com/hibernate/hibernate-search</url>
        <tag>HEAD</tag>
    </scm>

    <organization>
        <name>Hibernate</name>
        <url>http://www.hibernate.org</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Lesser General Public License v2.1 or later</name>
            <url>http://www.opensource.org/licenses/LGPL-2.1</url>
            <comments>See also: http://hibernate.org/license</comments>
        </license>
    </licenses>

    <ciManagement>
        <system>Jenkins</system>
        <url>https://ci.hibernate.org/job/hibernate-search/</url>
    </ciManagement>

    <developers>
        <developer>
            <id>epbernard</id>
            <name>Emmanuel Bernard</name>
            <email>emmanuel@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/emmanuel-bernard/</url>
        </developer>
        <developer>
            <id>hardy.ferentschik</id>
            <name>Hardy Ferentschik</name>
            <email>hferents@redhat.com</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/hardy-ferentschik/</url>
        </developer>
        <developer>
            <id>sannegrinovero</id>
            <name>Sanne Grinovero</name>
            <email>sanne@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/sanne-grinovero/</url>
        </developer>
        <developer>
            <id>gunnar.morling</id>
            <name>Gunnar Morling</name>
            <email>gunnar@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/gunnar-morling/</url>
        </developer>
        <developer>
            <id>davide.dalto</id>
            <name>Davide D'Alto</name>
            <email>davide@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/davide-dalto/</url>
        </developer>
        <developer>
            <id>guillaume.smet</id>
            <name>Guillaume Smet</name>
            <email>guillaume@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/guillaume-smet/</url>
        </developer>
        <developer>
            <id>yoann.rodiere</id>
            <name>Yoann Rodière</name>
            <email>yoann@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/yoann-rodiere/</url>
        </developer>
        <developer>
            <id>fabio.ercoli</id>
            <name>Fabio Massimo Ercoli</name>
            <email>fabio@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/fabio-massimo-ercoli/</url>
        </developer>
        <developer>
            <id>mincong-h</id>
            <name>Mincong Huang</name>
            <email>mincong.h@gmail.com</email>
            <url>http://mincong-h.github.io</url>
        </developer>
    </developers>

    <mailingLists>
        <mailingList>
            <name>Hibernate Announcements</name>
            <post>hibernate-announce@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
        </mailingList>
        <mailingList>
            <name>Hibernate Commit Notifications</name>
            <post>hibernate-commits@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/hibernate-commits/</archive>
        </mailingList>
        <mailingList>
            <name>Hibernate Developers</name>
            <post>hibernate-dev@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
            <otherArchives>
                <otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.org/index.html</otherArchive>
            </otherArchives>
        </mailingList>
        <mailingList>
            <name>Hibernate Issue Notifications</name>
            <post>hibernate-issues@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive>
        </mailingList>
    </mailingLists>

    <modules>
        <module>build-config</module>
        <module>parents/public</module>
        <module>util/common</module>
        <module>util/internal/test</module>
        <module>engine</module>
        <module>backend/lucene</module>
        <module>backend/elasticsearch</module>
        <module>backend/elasticsearch-aws</module>
        <module>mapper/pojo-base</module>
        <module>mapper/javabean</module>
        <module>mapper/orm</module>
        <module>mapper/orm-batch-jsr352/core</module>
        <module>mapper/orm-batch-jsr352/jberet</module>
        <module>v5migrationhelper/engine</module>
        <module>v5migrationhelper/orm</module>
        <module>util/internal/integrationtest</module>
        <module>parents/integrationtest</module>
        <module>integrationtest</module>
        <module>documentation</module>
    </modules>

    <properties>
        <!--
             Version to be used as baseline for API/SPI change reports,
             and for the migration guide
          -->
        <version.org.hibernate.search.previous-stable>5.11.5.Final</version.org.hibernate.search.previous-stable>

        <!-- Main dependencies -->

        <!-- >>> Common -->
        <version.org.jboss.logging.jboss-logging>3.4.1.Final</version.org.jboss.logging.jboss-logging>
        <version.org.jboss.logging.jboss-logging-tools>2.2.1.Final</version.org.jboss.logging.jboss-logging-tools>
        <javadoc.org.hibernate.search.url>https://docs.jboss.org/hibernate/search/${parsed-version.org.hibernate.search.majorVersion}.${parsed-version.org.hibernate.search.minorVersion}/api/</javadoc.org.hibernate.search.url>

        <!-- >>> Engine -->
        <!-- Nothing beyond common dependencies -->

        <!-- >>> Lucene -->
        <version.org.apache.lucene>8.7.0</version.org.apache.lucene>
        <javadoc.org.apache.lucene.tag>${parsed-version.org.apache.lucene.majorVersion}_${parsed-version.org.apache.lucene.minorVersion}_${parsed-version.org.apache.lucene.incrementalVersion}</javadoc.org.apache.lucene.tag>
        <javadoc.org.apache.lucene.core.url>https://lucene.apache.org/core/${javadoc.org.apache.lucene.tag}/core/</javadoc.org.apache.lucene.core.url>
        <javadoc.org.apache.lucene.analyzers-common.url>https://lucene.apache.org/core/${javadoc.org.apache.lucene.tag}/analyzers-common/</javadoc.org.apache.lucene.analyzers-common.url>
        <javadoc.org.apache.lucene.queryparser.url>https://lucene.apache.org/core/${javadoc.org.apache.lucene.tag}/queryparser/</javadoc.org.apache.lucene.queryparser.url>

        <!-- >>> Elasticsearch -->
        <!-- When updating the following versions you will likely need to update the
             matching test profile as well, e.g. elasticsearch-6.0 for the 6.0+ series -->
        <!-- The main version of Elasticsearch targeted by Hibernate Search, tested in the default profile -->
        <version.org.elasticsearch.main>7.10.0</version.org.elasticsearch.main>
        <!-- The versions of Elasticsearch advertised as compatible with Hibernate Search -->
        <version.org.elasticsearch.compatible.text>5.6, 6.8 or 7.10</version.org.elasticsearch.compatible.text>
        <!-- The versions of Elasticsearch that may work, but are not given priority for bugfixes and new features -->
        <version.org.elasticsearch.compatible.potentially.text>6.0 or 7.0</version.org.elasticsearch.compatible.potentially.text>
        <!-- The version of the Elasticsearch client used by Hibernate Search, independently from the version of the remote cluster -->
        <version.org.elasticsearch.client>${version.org.elasticsearch.main}</version.org.elasticsearch.client>
        <documentation.org.elasticsearch.url>https://www.elastic.co/guide/en/elasticsearch/reference/${parsed-version.org.elasticsearch.main.majorVersion}.${parsed-version.org.elasticsearch.main.minorVersion}</documentation.org.elasticsearch.url>
        <version.com.google.code.gson>2.8.5</version.com.google.code.gson>
        <version.software.amazon.awssdk>2.14.18</version.software.amazon.awssdk>
        <!-- Jackson: used by the Elasticsearch REST client, the AWS SDK and in tests (wiremock, ...) -->
        <version.com.fasterxml.jackson>2.10.4</version.com.fasterxml.jackson>
        <!--
             In the past, there has been jackson-databind bugfix releases without any jackson-core release,
             so we had to use different versions, e.g. jackson-core 2.9.9 and jackson-databind 2.9.9.3.
             That's why we have two separate properties for jackson versions,
             even though they may have the same value from time to time.
         -->
        <version.com.fasterxml.jackson.databind>${version.com.fasterxml.jackson}</version.com.fasterxml.jackson.databind>
        <!-- Reactive-streams: used by the AWS SDK -->
        <version.org.reactivestreams.reactive-streams>1.0.2</version.org.reactivestreams.reactive-streams>
        <!-- slf4j: used by the AWS SDK -->
        <version.org.slf4j>1.7.30</version.org.slf4j>

        <!-- >>> ORM -->
        <version.org.hibernate>5.4.28.Final</version.org.hibernate>
        <javadoc.org.hibernate.url>https://docs.jboss.org/hibernate/orm/${parsed-version.org.hibernate.majorVersion}.${parsed-version.org.hibernate.minorVersion}/javadocs/</javadoc.org.hibernate.url>
        <documentation.org.hibernate.url>https://docs.jboss.org/hibernate/orm/${parsed-version.org.hibernate.majorVersion}.${parsed-version.org.hibernate.minorVersion}/userguide/html_single/Hibernate_User_Guide.html</documentation.org.hibernate.url>
        <version.org.hibernate.commons.annotations>5.1.2.Final</version.org.hibernate.commons.annotations>
        <version.javax.persistence>2.2</version.javax.persistence>

        <!-- >>> JSR 352 -->
        <version.javax.batch>1.0.1</version.javax.batch>
        <version.org.jberet>1.4.0.Final</version.org.jberet>

        <!-- >>> Java EE/Jakarta EE dependencies -->
        <!-- Used in the JSR352 integration in particular, but also in the ORM integration (?) and various tests -->
        <version.javax.inject>1</version.javax.inject>
        <version.javax.enterprise>2.0</version.javax.enterprise>
        <version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec>1.0.2.Final</version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec>
        <version.org.jboss.spec.javax.transaction.jboss-transaction-api_1.2_spec>1.1.1.Final</version.org.jboss.spec.javax.transaction.jboss-transaction-api_1.2_spec>
        <!-- This is used to generate a link to the Java EE javadoc -->
        <javadoc.javaee.url>https://javaee.github.io/javaee-spec/javadocs/</javadoc.javaee.url>

        <!-- Test dependencies -->

        <!-- >>> Common -->
        <version.log4j>2.13.3</version.log4j>
        <version.junit>4.13.1</version.junit>

        <version.org.hamcrest>2.2</version.org.hamcrest>
        <version.org.mockito>3.5.13</version.org.mockito>
        <version.org.assertj.assertj-core>3.15.0</version.org.assertj.assertj-core>
        <version.org.awaitily>4.0.2</version.org.awaitily>
        <version.org.skyscreamer.jsonassert>1.5.0</version.org.skyscreamer.jsonassert>
        <version.io.takari.junit>1.2.7</version.io.takari.junit>
        <version.com.h2database>1.4.200</version.com.h2database>
        <version.com.github.tomakehurst.wiremock>2.26.3</version.com.github.tomakehurst.wiremock>
        <version.org.apache.commons.lang3>3.10</version.org.apache.commons.lang3>
        <version.org.jboss.weld>3.1.5.SP1</version.org.jboss.weld>

        <!-- >>> Performance tests -->
        <version.org.openjdk.jmh>1.23</version.org.openjdk.jmh>

        <!-- >>> JSR 352: JBatch runtime -->
        <version.com.ibm.jbatch>1.0</version.com.ibm.jbatch>
        <version.org.apache.derby>10.13.1.1</version.org.apache.derby>

        <!-- >>> JSR 352: JBeret SE dependencies -->
        <version.org.jboss.marshalling>2.0.10.Final</version.org.jboss.marshalling>
        <version.org.wildfly.security.wildfly-security-manager>1.1.2.Final</version.org.wildfly.security.wildfly-security-manager>
        <version.org.google.guava>30.0-jre</version.org.google.guava>

        <!-- >>> Spring integration tests -->
        <version.org.springframework.boot>2.4.0</version.org.springframework.boot>

        <!-- Maven plugins versions -->

        <version.assembly.plugin>3.1.0</version.assembly.plugin>
        <version.buildhelper.plugin>3.0.0</version.buildhelper.plugin>
        <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
        <version.bundle.plugin>3.3.0</version.bundle.plugin>
        <version.clean.plugin>3.0.0</version.clean.plugin>
        <!-- Needing 3.6.2 at least because of MCOMPILER-294 -->
        <version.compiler.plugin>3.8.1</version.compiler.plugin>
        <version.dependency.plugin>3.0.2</version.dependency.plugin>
        <!-- Check dependencies for security vulnerabilities -->
        <version.dependency-check.plugin>3.1.1</version.dependency-check.plugin>
        <version.deploy.plugin>2.8.2</version.deploy.plugin>
        <version.org.eclipse.m2e.lifecycle-mapping>1.0.0</version.org.eclipse.m2e.lifecycle-mapping>
        <version.enforcer.plugin>3.0.0-M3</version.enforcer.plugin>
        <version.forbiddenapis.plugin>3.1</version.forbiddenapis.plugin>
        <version.help.plugin>2.2</version.help.plugin>
        <version.install.plugin>2.5.2</version.install.plugin>
        <version.io.takari.maven>0.7.6</version.io.takari.maven>
        <version.japicmp.plugin>0.9.3</version.japicmp.plugin>
        <version.jar.plugin>3.0.2</version.jar.plugin>
        <version.javadoc.plugin>3.2.0</version.javadoc.plugin>
        <version.jdeps.plugin>0.4.0</version.jdeps.plugin>
        <version.nexus-staging.plugin>1.6.8</version.nexus-staging.plugin>
        <version.processor.plugin>3.3.3</version.processor.plugin>
        <version.project-info.plugin>2.9</version.project-info.plugin>
        <version.release.plugin>2.5.3</version.release.plugin>
        <version.resources.plugin>3.0.2</version.resources.plugin>
        <version.shade.plugin>3.1.0</version.shade.plugin>
        <version.site.plugin>3.6</version.site.plugin>
        <version.source.plugin>3.0.1</version.source.plugin>
        <!-- Surefire versions are a minefield of bugs: be careful with upgrades -->
        <version.surefire.plugin>3.0.0-M5</version.surefire.plugin>
        <version.surefire.plugin.java-version.asm>7.3.1</version.surefire.plugin.java-version.asm>
        <version.failsafe.plugin>${version.surefire.plugin}</version.failsafe.plugin>
        <version.jacoco.plugin>0.8.3</version.jacoco.plugin>
        <version.coveralls.plugin>4.3.0</version.coveralls.plugin>
        <version.com.buschmais.jqassistant.plugin>1.8.0</version.com.buschmais.jqassistant.plugin>
        <version.com.github.alexcojocaru.elasticsearch.plugin>6.19</version.com.github.alexcojocaru.elasticsearch.plugin>
        <version.moditect.plugin>1.0.0.Beta2</version.moditect.plugin>
        <version.sonar.plugin>3.7.0.1746</version.sonar.plugin>
        <!--
            Please don't change the name of this property, it may be used and
            overridden by a CI job of the Checkstyle project so that they can
            check for regressions. Which is obviously good for us, too.
         -->
        <puppycrawl.checkstyle.version>8.29</puppycrawl.checkstyle.version>
        <version.com.puppycrawl.tools.checkstyle>${puppycrawl.checkstyle.version}</version.com.puppycrawl.tools.checkstyle>

        <!-- Asciidoctor -->

        <version.asciidoctor.plugin>1.5.8</version.asciidoctor.plugin>
        <version.org.hibernate.infra.hibernate-asciidoctor-theme>1.0.4.Final</version.org.hibernate.infra.hibernate-asciidoctor-theme>
        <version.org.jruby>9.1.17.0</version.org.jruby>
        <version.org.asciidoctor.asciidoctorj>1.5.8</version.org.asciidoctor.asciidoctorj>
        <version.org.asciidoctor.asciidoctorj-pdf>1.5.0-alpha.18</version.org.asciidoctor.asciidoctorj-pdf>

        <!-- JBoss public repository -->

        <jboss.public.repo.id>jboss-public-repository-group</jboss.public.repo.id>
        <jboss.public.repo.url>https://repository.jboss.org/nexus/content/groups/public-jboss/</jboss.public.repo.url>

        <!-- Maven Central repository -->

        <mavencentral.repo.url>https://repo.maven.apache.org/maven2/</mavencentral.repo.url>

        <!-- Eclipse repository (for the ECJ compiler, disabled by default) -->

        <eclipse.repo.id>eclipse-staging</eclipse.repo.id>
        <eclipse.repo.url>https://repo.eclipse.org/content/repositories/eclipse-staging/</eclipse.repo.url>

        <!-- Repository Deployment URLs -->

        <jboss.releases.repo.id>jboss-releases-repository</jboss.releases.repo.id>
        <jboss.releases.repo.url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</jboss.releases.repo.url>
        <jboss.releases.repo.baseUrl>https://repository.jboss.org/nexus/</jboss.releases.repo.baseUrl>
        <jboss.snapshots.repo.id>jboss-snapshots-repository</jboss.snapshots.repo.id>
        <jboss.snapshots.repo.url>https://repository.jboss.org/nexus/content/repositories/snapshots/</jboss.snapshots.repo.url>

        <!-- Build settings -->

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Set statically: we want our code to comply with this version -->
        <java-version.baseline.major>8</java-version.baseline.major>
        <!-- 'java.specification.version' is only correct from Java 9 onwards -->
        <java-version.jdk.major>${java.specification.version}</java-version.jdk.major>

        <maven.compiler.release>${java-version.baseline.major}</maven.compiler.release>
        <!-- Generate Java 13/14 bytecode for tests when building with JDK13/14 -->
        <maven.compiler.testRelease>${java-version.jdk.major}</maven.compiler.testRelease>

        <!-- Also set source/target, because several other plugins rely on this and don't understand release -->
        <maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
        <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
        <maven.compiler.testSource>${maven.compiler.testRelease}</maven.compiler.testSource>
        <maven.compiler.testTarget>${maven.compiler.testRelease}</maven.compiler.testTarget>

        <!--
                Options to compile with the Eclipse compiler when building with maven (not with the IDE).
                See profile "compiler-eclipse".
                Note the version of ECJ is overridden because the one bundled with the latest plexus-compiler version
                is outdated and leads to compilation errors.
         -->
        <version.org.codehaus.plexus.plexus-compiler-eclipse>2.8.6</version.org.codehaus.plexus.plexus-compiler-eclipse>
        <version.org.eclipse.jdt.ecj>3.21.0</version.org.eclipse.jdt.ecj>

        <!--
            The absolute path to the root project directory.
            This property is set by the build-helper plugin.
            We initialize it to some crude, potentially wrong value,
            because the Sonar Maven plugin uses this property indirectly,
            but ignores any change made by other plugins.
            This default value is the best we can do without the help of a Maven plugin.

            Useful resources:
             - https://www.mojohaus.org/build-helper-maven-plugin/rootlocation-mojo.html
         -->
        <rootProject.directory>${user.dir}</rootProject.directory>
        <!--
            The absolute path to an empty subdirectory of the root project.
            This is used in places where we need a path to an existing, empty directory,
            such as when fooling Sonar into thinking there is no "main" source in a project.
         -->
        <rootProject.emptySubdirectory>${rootProject.directory}/.empty</rootProject.emptySubdirectory>

        <!-- JDK version required for the build; we target 8 but require at least 11 for the build -->
        <jdk.min.version>11</jdk.min.version>

        <!-- Maven version required for the build -->
        <!--
             We need at least 3.6.2, which includes Maven-resolver 1.4.0+,
             which fixes https://issues.apache.org/jira/browse/MRESOLVER-33
             WARNING: Do not forget to call 'mvn -N io.takari:maven:wrapper'
             when you update this property!
         -->
        <maven.min.version>3.6.2</maven.min.version>

        <!-- Whether javadoc problems (errors, warnings) should fail the build) -->
        <failOnJavadocError>true</failOnJavadocError>

        <!-- Can be overridden by subprojects if dependency convergence cannot be achieved -->
        <enforcer.dependencyconvergence.skip>false</enforcer.dependencyconvergence.skip>

        <!-- Test settings -->
        <!-- Set empty default values to avoid Maven leaving property references (${...}) when it doesn't find a value -->

        <!-- IMPORTANT: For Java 8, this must be the path to the JDK, not to the JRE -->
        <surefire.jvm.java_home>${java.home}</surefire.jvm.java_home>
        <surefire.jvm.java_executable>${surefire.jvm.java_home}/bin/java</surefire.jvm.java_executable>
        <surefire.jvm.args.memory>-Xmx512m -Xms128m</surefire.jvm.args.memory>
        <!-- JVM args to be customized depending on the Java version -->
        <surefire.jvm.args.java-version></surefire.jvm.args.java-version>
        <!-- JVM args generated by JaCoCo -->
        <surefire.jvm.args.jacoco></surefire.jvm.args.jacoco>
        <failsafe.jvm.args.jacoco></failsafe.jvm.args.jacoco>
        <!-- JVM args to be customized by each Maven module -->
        <surefire.jvm.args.module></surefire.jvm.args.module>
        <!--
             Pass these properties as system properties to be able to switch to
             a different database without re-compiling the hibernate.properties file
             (which is located in a dependency of the integration tests modules)
         -->
        <failsafe.jvm.args.hibernate-orm></failsafe.jvm.args.hibernate-orm>
        <surefire.jvm.args>${surefire.jvm.args.memory} ${surefire.jvm.args.java-version} ${surefire.jvm.args.module} ${surefire.jvm.args.jacoco}</surefire.jvm.args>
        <failsafe.jvm.args>${surefire.jvm.args.memory} ${surefire.jvm.args.java-version} ${surefire.jvm.args.module} ${failsafe.jvm.args.jacoco} ${failsafe.jvm.args.hibernate-orm}</failsafe.jvm.args>

        <!-- Disable integration tests selectively. To be set in specific profile, e.g. for a specific JDK version. -->
        <failsafe.spring.skip>${skipITs}</failsafe.spring.skip>

        <!--
            Should be set by submodules.
            Used by integration tests modules that execute tests from another module.
            Allows to distinguish between multiple executions of the same test in test reports.
         -->
        <surefire.executing-module>default</surefire.executing-module>
        <!--
            Should be set from the command line.
            Used by CI jobs that execute tests in multiple environments.
            Allows to distinguish between multiple executions of the same test in test reports.
         -->
        <surefire.environment>default</surefire.environment>

        <!-- Elasticsearch tests properties -->

        <!-- Control how an Elasticsearch instance is run automatically during tests -->
        <test.elasticsearch.run.skip>false</test.elasticsearch.run.skip>
        <test.elasticsearch.run.java_home>${java.home}</test.elasticsearch.run.java_home>
        <!--
             These properties are transparently passed as system properties to integration tests,
             and retrieved by a test utility:
             org.hibernate.search.util.impl.integrationtest.backend.elasticsearch.ElasticsearchTestHostConnectionConfiguration
             This is better than configuration files filtered by Maven,
             because we will be able to change the configuration without re-compiling the configuration file
             (which is located in a dependency of the integration tests modules).
         -->
        <test.elasticsearch.connection.uris></test.elasticsearch.connection.uris>
        <test.elasticsearch.connection.username></test.elasticsearch.connection.username>
        <test.elasticsearch.connection.password></test.elasticsearch.connection.password>
        <test.elasticsearch.connection.aws.signing.enabled>false</test.elasticsearch.connection.aws.signing.enabled>
        <test.elasticsearch.connection.aws.region></test.elasticsearch.connection.aws.region>
        <test.elasticsearch.connection.aws.credentials.type></test.elasticsearch.connection.aws.credentials.type>
        <test.elasticsearch.connection.aws.credentials.access_key_id></test.elasticsearch.connection.aws.credentials.access_key_id>
        <test.elasticsearch.connection.aws.credentials.secret_access_key></test.elasticsearch.connection.aws.credentials.secret_access_key>
        <!-- Control how integration tests format the requests sent to Elasticsearch -->
        <test.elasticsearch.testdialect></test.elasticsearch.testdialect>

        <!-- Lucene tests properties -->

        <test.lucene.indexes.path>${project.build.directory}/test-indexes/</test.lucene.indexes.path>

        <!-- Eclipse plugin options -->

        <m2e.apt.activation>jdt_apt</m2e.apt.activation>

        <!-- Sonar options -->
        <!--
            We want to take into account coverage data from integration tests from other projects as well.
            This requires to use a single destination file for ITs, because:
             - Integration tests cover code from other modules.
             - The Sonar plugin computes coverage when inspecting each module,
               and by default only takes into account JaCoCo coverage reports from the inspected module.
               Thus it ignores some relevant ITs by default.
             - Even when configured, the Sonar plugin only accept an *explicit* list of JaCoCo coverage reports
               (no wildcards).
               Thus we cannot easily configure the Sonar plugin to inspect JaCoCo coverage reports from other modules,
               unless we somehow aggregate all of the coverage data into a single, shared JaCoCo coverage report.
            The chosen solution was to make the "reports" module invoke jacoco's "report-aggregate" goal
            to create a single aggregate report, and configure sonar to only inspect that file.

            Useful resources to understand what is going on (caution, not everything is up-to-date):
             - https://docs.sonarqube.org/display/SONAR/Analysis+Parameters
             - https://docs.sonarqube.org/display/PLUG/Usage+of+JaCoCo+with+Java+Plugin
             - https://www.devcon5.ch/en/blog/2015/05/29/multi-module-integration-test-coverage-sonar-jacoco/
             - http://javamemento.blogspot.fr/2016/02/sonar-jacoco-maven-multi-module.html
             - https://github.com/SonarSource/sonar-scanning-examples/blob/master/sonarqube-scanner-maven/pom.xml
             - https://stackoverflow.com/a/49528226/6692043
             - https://www.eclemma.org/jacoco/trunk/doc/report-aggregate-mojo.html
             - Not relevant anymore, but we used to merge *.exec files: https://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html
         -->
        <sonar.coverage.jacoco.xmlReportPaths>${rootProject.directory}/reports/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
        <!--
            Exclude build code and integration tests defined in the main source (utils, Showcases, Backend TCK)
            from coverage computation.
         -->
        <sonar.coverage.exclusions>
            **/org/hibernate/checkstyle/**,
            **/org/hibernate/search/util/impl/test/**,
            **/org/hibernate/search/util/impl/integrationtest/**,
            **/org/hibernate/search/integrationtest/**
        </sonar.coverage.exclusions>
        <!--
            Exclude build code, unit tests and integration tests from duplication analysis.
         -->
        <sonar.cpd.exclusions>
            **/org/hibernate/checkstyle/**,
            **/src/test/java/**,
            **/org/hibernate/search/integrationtest/**
        </sonar.cpd.exclusions>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-util-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-util-internal-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-engine</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-backend-elasticsearch</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-backend-elasticsearch-aws</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-backend-lucene</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-mapper-pojo-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-mapper-javabean</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-mapper-orm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-v5migrationhelper-engine</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-v5migrationhelper-orm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-mapper-orm-batch-jsr352-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-mapper-orm-batch-jsr352-jberet</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-documentation</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-backend-elasticsearch</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-backend-lucene</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-pojo-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-orm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-orm-cdi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-orm-spring</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-orm-envers</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-orm-realbackend</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-showcase-library</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-v5migrationhelper-engine</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-v5migrationhelper-orm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-integrationtest-mapper-orm-batch-jsr352</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.search</groupId>
                <artifactId>hibernate-search-documentation</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${version.org.hibernate}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-envers</artifactId>
                <version>${version.org.hibernate}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.common</groupId>
                <artifactId>hibernate-commons-annotations</artifactId>
                <version>${version.org.hibernate.commons.annotations}</version>
            </dependency>
            <dependency>
                <groupId>org.elasticsearch.client</groupId>
                <artifactId>elasticsearch-rest-client</artifactId>
                <version>${version.org.elasticsearch.client}</version>
            </dependency>
            <dependency>
                <groupId>org.elasticsearch.client</groupId>
                <artifactId>elasticsearch-rest-client-sniffer</artifactId>
                <version>${version.org.elasticsearch.client}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${version.com.google.code.gson}</version>
            </dependency>
            <dependency>
                <groupId>software.amazon.awssdk</groupId>
                <artifactId>auth</artifactId>
                <version>${version.software.amazon.awssdk}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.org.jboss.logging.jboss-logging}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-annotations</artifactId>
                <version>${version.org.jboss.logging.jboss-logging-tools}</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>

            <!-- Lucene backend -->
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-core</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-analyzers-common</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-queryparser</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-join</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-facet</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>

            <!-- JavaEE/JakartaEE dependencies -->
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>javax.persistence-api</artifactId>
                <version>${version.javax.persistence}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>${version.javax.enterprise}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${version.javax.inject}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec.javax.annotation</groupId>
                <artifactId>jboss-annotations-api_1.2_spec</artifactId>
                <version>${version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec.javax.transaction</groupId>
                <artifactId>jboss-transaction-api_1.2_spec</artifactId>
                <version>${version.org.jboss.spec.javax.transaction.jboss-transaction-api_1.2_spec}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.batch</groupId>
                <artifactId>javax.batch-api</artifactId>
                <version>${version.javax.batch}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Jackson: used by the Elasticsearch REST client and in tests (wiremock, ...) -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${version.com.fasterxml.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${version.com.fasterxml.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${version.com.fasterxml.jackson.databind}</version>
            </dependency>
            <dependency>
                <groupId>org.reactivestreams</groupId>
                <artifactId>reactive-streams</artifactId>
                <version>${version.org.reactivestreams.reactive-streams}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.org.slf4j}</version>
            </dependency>

            <!-- JBeret used by batch-jsr352 jberet module -->
            <dependency>
                <groupId>org.jberet</groupId>
                <artifactId>jberet-core</artifactId>
                <version>${version.org.jberet}</version>
            </dependency>

            <!-- Test -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <!--
                Manage the upgrade from Hamcrest 1.x to 2.x:
                http://hamcrest.org/JavaHamcrest/distributables#upgrading-from-hamcrest-1x
             -->
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>${version.org.hamcrest}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${version.org.hamcrest}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${version.org.hamcrest}</version>
            </dependency>
            <dependency>
                <groupId>io.takari.junit</groupId>
                <artifactId>takari-cpsuite</artifactId>
                <version>${version.io.takari.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.org.mockito}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${version.log4j}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${version.log4j}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.org.assertj.assertj-core}</version>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${version.org.awaitily}</version>
            </dependency>
            <dependency>
                <groupId>org.skyscreamer</groupId>
                <artifactId>jsonassert</artifactId>
                <version>${version.org.skyscreamer.jsonassert}</version>
            </dependency>
            <dependency>
                <groupId>com.github.tomakehurst</groupId>
                <artifactId>wiremock</artifactId>
                <version>${version.com.github.tomakehurst.wiremock}</version>
                <exclusions>
                    <!--
                        These dependencies point to multiple different versions, and are not really necessary in our case:
                        either they are not used, or they are provided by other dependencies such as the Elasticsearch Rest client.
                     -->
                    <exclusion>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <!-- Dependency management is necessary for Wiremock in particular (it has internal dependency divergence) -->
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${version.org.apache.commons.lang3}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.se</groupId>
                <artifactId>weld-se-shaded</artifactId>
                <version>${version.org.jboss.weld}</version>
            </dependency>

            <!-- Performance tests -->
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>${version.org.openjdk.jmh}</version>
            </dependency>

            <!-- Hibernate ORM testing tools -->
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-testing</artifactId>
                <version>${version.org.hibernate}</version>
                <exclusions>
                    <!-- we use Log4J 2 -->
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- JBatch runtime -->
            <dependency>
                <groupId>com.ibm.jbatch</groupId>
                <artifactId>com.ibm.jbatch-runtime</artifactId>
                <version>${version.com.ibm.jbatch}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.derby</groupId>
                <artifactId>derby</artifactId>
                <version>${version.org.apache.derby}</version>
            </dependency>

            <!-- JBeret Core and JBeret SE runtime dependencies -->
            <dependency>
                <groupId>org.jboss.marshalling</groupId>
                <artifactId>jboss-marshalling</artifactId>
                <version>${version.org.jboss.marshalling}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.security</groupId>
                <artifactId>wildfly-security-manager</artifactId>
                <version>${version.org.wildfly.security.wildfly-security-manager}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.org.google.guava}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.jberet</groupId>
                <artifactId>jberet-se</artifactId>
                <version>${version.org.jberet}</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${version.com.h2database}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <failOnWarning>true</failOnWarning>
                    <release>${maven.compiler.release}</release>
                    <testRelease>${maven.compiler.testRelease}</testRelease>
                    <encoding>UTF-8</encoding>
                    <!-- needed because of compiler bug: http://bugs.sun.com/view_bug.do?bug_id=6512707 -->
                    <proc>none</proc>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.marschall</groupId>
                <artifactId>jdeps-maven-plugin</artifactId>
                <!--
                    Not enabling automatic executions; run:
                     > mvn jdeps:jdeps
                     to get a report.
                -->
                <configuration>
                    <!-- Allows to see which JRE profiles will be needed -->
                    <profile>true</profile>
                    <failOnWarning>true</failOnWarning>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>set-root-location-property</id>
                        <goals>
                            <goal>rootlocation</goal>
                        </goals>
                        <configuration>
                            <rootLocationProperty>rootProject.directory</rootLocationProperty>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-project-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.org.hibernate.search</propertyPrefix>
                            <versionString>${project.version}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-project-previous-stable-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.org.hibernate.search.previous-stable</propertyPrefix>
                            <versionString>${version.org.hibernate.search.previous-stable}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-orm-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.org.hibernate</propertyPrefix>
                            <versionString>${version.org.hibernate}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-lucene-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.org.apache.lucene</propertyPrefix>
                            <versionString>${version.org.apache.lucene}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-elasticsearch-main-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.org.elasticsearch.main</propertyPrefix>
                            <versionString>${version.org.elasticsearch.main}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-elasticsearch-client-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.org.elasticsearch.client</propertyPrefix>
                            <versionString>${version.org.elasticsearch.client}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-gson-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.com.google.code.gson</propertyPrefix>
                            <versionString>${version.com.google.code.gson}</versionString>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-jpa-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.javax.persistence</propertyPrefix>
                            <versionString>${version.javax.persistence}</versionString>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Skip the deploy plugin explicitly: we use nexus-staging-maven-plugin instead -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <!--
                 Configure the nexus-staging-maven-plugin explicitly (without <extension>true</extension>)
                 in order to work around a problem in the "reports" module (see that module's POM for more info).
             -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <extensions>false</extensions><!-- This is essential: do not put true here -->
                <configuration>
                    <serverId>${jboss.releases.repo.id}</serverId>
                    <!-- The following, by default, is only used for actual releases, not for snapshot deployments -->
                    <nexusUrl>${jboss.releases.repo.baseUrl}</nexusUrl>
                </configuration>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <!--
                                This will only put artifacts in a staging directory.
                                See the "reports" module for actual deployment, at the end of the build.
                             -->
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-common-rules</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[${jdk.min.version},)</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>${maven.min.version}</version>
                                </requireMavenVersion>
                                <banDuplicatePomDependencyVersions />
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-dependency-convergence</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <skip>${enforcer.dependencyconvergence.skip}</skip>
                            <rules>
                                <DependencyConvergence />
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <goals>deploy</goals>
                    <arguments>-DskipTests -DskipITs</arguments>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                    <preparationGoals>clean install</preparationGoals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--
                    Build configuration
                 -->

                <plugin>
                    <groupId>io.takari</groupId>
                    <artifactId>maven</artifactId>
                    <version>${version.io.takari.maven}</version>
                    <configuration>
                        <maven>${maven.min.version}</maven>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.marschall</groupId>
                    <artifactId>jdeps-maven-plugin</artifactId>
                    <version>${version.jdeps.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.clean.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.install.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.resources.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.site.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.jar.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.compiler.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.bsc.maven</groupId>
                    <artifactId>maven-processor-plugin</artifactId>
                    <version>${version.processor.plugin}</version>
                    <executions>
                        <!-- Run annotation processors on src/main/java sources -->
                        <execution>
                            <id>process</id>
                            <goals>
                                <goal>process</goal>
                            </goals>
                            <phase>generate-sources</phase>
                            <configuration>
                                <releaseVersion>${maven.compiler.release}</releaseVersion>
                                <processors>
                                    <processor>org.jboss.logging.processor.apt.LoggingToolsProcessor</processor>
                                </processors>
                                <!-- Disable usage of the @Generated annotation: too much trouble as requirements are different across JDK8 vs JDK9 -->
                                <!-- See also: https://github.com/jboss-logging/jboss-logging-tools/pull/60#issuecomment-293088198 -->
                                <compilerArguments>-Aorg.jboss.logging.tools.addGeneratedAnnotation=false</compilerArguments>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.jboss.logging</groupId>
                            <artifactId>jboss-logging-processor</artifactId>
                            <version>${version.org.jboss.logging.jboss-logging-tools}</version>
                            <scope>compile</scope>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${version.nexus-staging.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${version.assembly.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.release.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.javadoc.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.source.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.deploy.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${version.dependency.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-help-plugin</artifactId>
                    <version>${version.help.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${version.enforcer.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <version>${version.bundle.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${version.shade.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${version.buildhelper.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>${version.forbiddenapis.plugin}</version>
                    <executions>
                        <execution>
                            <id>verify-forbidden-apis</id>
                            <configuration>
                                <!-- if the used Java version is too new, don't fail, just do nothing: -->
                                <failOnUnsupportedJava>false</failOnUnsupportedJava>
                                <excludes>
                                    <!-- JBoss Logger formats messages according to default Locale (bug or feature?) -->
                                    <!-- Also, we allow JBoss Loggers to use SearchException constructors -->
                                    <exclude>**/*_$logger.class</exclude>
                                    <!-- JBoss message bundles format messages -->
                                    <exclude>**/*_$bundle.class</exclude>
                                    <!--
                                         SearchException and subclasses are allowed to use SearchException constructors,
                                         on contrary to the rest of the code
                                      -->
                                    <exclude>**/SearchException.class</exclude>
                                    <exclude>**/ClassLoadingException.class</exclude>
                                    <exclude>**/ElasticsearchSchemaValidationException.class</exclude>
                                    <exclude>**/SearchTimeoutException.class</exclude>
                                    <!-- The following class requires AbstractProducedQuery to implement a org.hibernate.query.Query -->
                                    <exclude>**/HibernateOrmSearchQueryAdapter.class</exclude>
                                    <!-- The following class uses a legal SPI that strangely has an internal as method parameter -->
                                    <exclude>**/SimpleSessionFactoryBuilder.class</exclude>
                                    <!--
                                        Classes allowed to use MethodHandles because we expose options to integrators
                                        so that they can opt out
                                     -->
                                    <exclude>**/MethodHandleValueReadHandleFactory.class</exclude>
                                    <!--
                                        Class allowed to use CompletableFuture#join()
                                     -->
                                    <exclude>**/Futures.class</exclude>
                                </excludes>
                                <bundledSignatures>
                                    <!-- These signatures on the top are not specific to any JDK version -->
                                    <bundledSignature>jdk-system-out</bundledSignature>
                                    <bundledSignature>jdk-non-portable</bundledSignature>
                                    <!-- The jdk-reflection is not yet something we can avoid -->
                                    <!--<bundledSignature>jdk-reflection</bundledSignature>-->

                                    <!-- All following signatures should be replicated for each target JDK version we intend to support -->
                                    <bundledSignature>jdk-unsafe-1.8</bundledSignature>
                                    <bundledSignature>jdk-unsafe-9</bundledSignature>
                                    <bundledSignature>jdk-unsafe-10</bundledSignature>
                                    <bundledSignature>jdk-unsafe-11</bundledSignature>
                                    <bundledSignature>jdk-unsafe-12</bundledSignature>
                                    <bundledSignature>jdk-unsafe-13</bundledSignature>
                                    <bundledSignature>jdk-unsafe-14</bundledSignature>
                                    <bundledSignature>jdk-unsafe-15</bundledSignature>

                                    <bundledSignature>jdk-deprecated-1.8</bundledSignature>
                                    <bundledSignature>jdk-deprecated-9</bundledSignature>
                                    <bundledSignature>jdk-deprecated-10</bundledSignature>
                                    <bundledSignature>jdk-deprecated-11</bundledSignature>
                                    <bundledSignature>jdk-deprecated-12</bundledSignature>
                                    <bundledSignature>jdk-deprecated-13</bundledSignature>
                                    <bundledSignature>jdk-deprecated-14</bundledSignature>
                                    <bundledSignature>jdk-deprecated-15</bundledSignature>

                                    <bundledSignature>jdk-internal-1.8</bundledSignature>
                                    <bundledSignature>jdk-internal-9</bundledSignature>
                                    <bundledSignature>jdk-internal-10</bundledSignature>
                                    <bundledSignature>jdk-internal-11</bundledSignature>
                                    <bundledSignature>jdk-internal-12</bundledSignature>
                                    <bundledSignature>jdk-internal-13</bundledSignature>
                                    <bundledSignature>jdk-internal-14</bundledSignature>
                                    <bundledSignature>jdk-internal-15</bundledSignature>
                                </bundledSignatures>
                                <failOnMissingClasses>false</failOnMissingClasses>
                                <ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
                                <signaturesArtifacts>
                                    <signaturesArtifact>
                                        <groupId>org.hibernate.search</groupId>
                                        <artifactId>hibernate-search-build-config</artifactId>
                                        <version>${project.version}</version>
                                        <type>jar</type>
                                        <path>forbidden-runtime.txt</path>
                                    </signaturesArtifact>
                                </signaturesArtifacts>
                            </configuration>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify-forbidden-test-apis</id>
                            <configuration>
                                <!-- if the used Java version is too new, don't fail, just do nothing: -->
                                <failOnUnsupportedJava>false</failOnUnsupportedJava>
                                <ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
                                <excludes>
                                    <!--
                                        Only those two classes are allowed to build search integrators,
                                        because they do it right (with guaranteed calls to close at the end of the test).
                                    -->
                                    <exclude>**/org/hibernate/search/testsupport/junit/SearchFactoryHolder.class</exclude>
                                    <exclude>**/org/hibernate/search/testsupport/junit/SearchIntegratorResource.class</exclude>
                                </excludes>
                                <bundledSignatures>
                                    <!-- This will automatically choose the right signatures based on 'targetVersion': -->
                                    <bundledSignature>jdk-unsafe</bundledSignature>
                                    <bundledSignature>jdk-deprecated</bundledSignature>
                                    <bundledSignature>jdk-non-portable</bundledSignature>
                                    <bundledSignature>jdk-internal</bundledSignature>
                                </bundledSignatures>
                                <signaturesArtifacts>
                                    <signaturesArtifact>
                                        <groupId>org.hibernate.search</groupId>
                                        <artifactId>hibernate-search-build-config</artifactId>
                                        <version>${project.version}</version>
                                        <type>jar</type>
                                        <path>forbidden-tests.txt</path>
                                    </signaturesArtifact>
                                </signaturesArtifacts>
                            </configuration>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCheck</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version.checkstyle.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.hibernate.search</groupId>
                            <artifactId>hibernate-search-build-config</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                        <!--
                             force SLF4J dependency to align
                             Maven internals and CheckStyle's
                             see https://github.com/jcgay/maven-color/wiki/Problems
                             If that causes problem, that can be removed
                             but maven-color won't work -->
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${version.com.puppycrawl.tools.checkstyle}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>jcl-over-slf4j</artifactId>
                            <version>${version.org.slf4j}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-jdk14</artifactId>
                            <version>${version.org.slf4j}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <!-- Location is relative to the classpath -->
                        <configLocation>checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <violationSeverity>error</violationSeverity>
                        <includeTestResources>true</includeTestResources>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <resourceIncludes>**/*.xml,**/*.properties</resourceIncludes>
                        <!-- generated respectively copied code -->
                        <excludes>
                            **/Generated.java,**/TypeHelper*.java,**/MatchSuppressor.java,**/CommentSuppressor.java,**/NeverSuppress.java,
                            **/*_$logger.java,**/*_$bundle.java,
                            **/module-info.java
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-style</id>
                            <phase>verify</phase>
                            <!-- not using checkstyle:checkstyle here, as for
                                some reason checkstyle:check finds more errors -->
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.moditect</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>${version.moditect.plugin}</version>
                </plugin>

                <!--
                    Test configuration
                 -->

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.surefire.plugin}</version>
                    <configuration>
                        <forkCount>1</forkCount>
                        <reuseForks>true</reuseForks>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <runOrder>alphabetical</runOrder>
                        <!--
                             Stack traces for failing tests are useless if trimStackTrace = true (the default).
                             See https://issues.apache.org/jira/browse/SUREFIRE-1226?focusedCommentId=16187391&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16187391
                         -->
                        <trimStackTrace>false</trimStackTrace>
                        <systemPropertyVariables>
                            <com.sun.management.jmxremote>true</com.sun.management.jmxremote>
                            <org.hibernate.search.enable_performance_tests>${org.hibernate.search.enable_performance_tests}</org.hibernate.search.enable_performance_tests>
                            <org.hibernate.search.fail_on_unreleased_service>true</org.hibernate.search.fail_on_unreleased_service>
                        </systemPropertyVariables>
                        <jvm>${surefire.jvm.java_executable}</jvm>
                        <argLine>${surefire.jvm.args}</argLine>
                        <reportNameSuffix>${surefire.environment}-${surefire.executing-module}</reportNameSuffix>
                    </configuration>
                    <dependencies>
                        <!--
                             Force tests to execute with JUnit 4
                             See http://maven.apache.org/surefire/maven-failsafe-plugin/examples/junit.html
                         -->
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit47</artifactId>
                            <version>${version.failsafe.plugin}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${version.failsafe.plugin}</version>
                    <configuration>
                        <forkCount>1</forkCount>
                        <reuseForks>true</reuseForks>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <runOrder>alphabetical</runOrder>
                        <!--
                             Stack traces for failing tests are useless if trimStackTrace = true (the default).
                             See https://issues.apache.org/jira/browse/SUREFIRE-1226?focusedCommentId=16187391&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16187391
                         -->
                        <trimStackTrace>false</trimStackTrace>
                        <systemPropertyVariables>
                            <com.sun.management.jmxremote>true</com.sun.management.jmxremote>
                            <org.hibernate.search.enable_performance_tests>${org.hibernate.search.enable_performance_tests}</org.hibernate.search.enable_performance_tests>
                            <org.hibernate.search.fail_on_unreleased_service>true</org.hibernate.search.fail_on_unreleased_service>
                            <org.hibernate.search.integrationtest.backend.elasticsearch.testdialect>${test.elasticsearch.testdialect}</org.hibernate.search.integrationtest.backend.elasticsearch.testdialect>
                            <org.hibernate.search.integrationtest.backend.elasticsearch.version>${test.elasticsearch.connection.version}</org.hibernate.search.integrationtest.backend.elasticsearch.version>
                        </systemPropertyVariables>
                        <jvm>${surefire.jvm.java_executable}</jvm>
                        <argLine>${failsafe.jvm.args}</argLine>
                        <reportNameSuffix>${surefire.environment}-${surefire.executing-module}</reportNameSuffix>
                    </configuration>
                    <dependencies>
                        <!--
                             Force tests to execute with JUnit 4
                             See http://maven.apache.org/surefire/maven-failsafe-plugin/examples/junit.html
                         -->
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit47</artifactId>
                            <version>${version.failsafe.plugin}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>com.github.alexcojocaru</groupId>
                    <artifactId>elasticsearch-maven-plugin</artifactId>
                    <version>${version.com.github.alexcojocaru.elasticsearch.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${version.jacoco.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>${version.coveralls.plugin}</version>
                    <configuration>
                        <relativeReportDirs>
                            <relativeReportDir>jacoco-aggregate</relativeReportDir>
                        </relativeReportDirs>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>jakarta.xml.bind</groupId>
                            <artifactId>jakarta.xml.bind-api</artifactId>
                            <version>2.3.2</version>
                        </dependency>
                        <dependency>
                            <groupId>org.glassfish.jaxb</groupId>
                            <artifactId>jaxb-runtime</artifactId>
                            <version>2.3.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>${version.asciidoctor.plugin}</version>
                    <configuration>
                        <!-- Enabled to validate internal links -->
                        <enableVerbose>true</enableVerbose>
                        <!-- Abort the build if something seems wrong -->
                        <logHandler>
                            <failIf>
                                <severity>WARN</severity>
                            </failIf>
                        </logHandler>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jruby</groupId>
                            <artifactId>jruby-complete</artifactId>
                            <version>${version.org.jruby}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj</artifactId>
                            <version>${version.org.asciidoctor.asciidoctorj}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj-pdf</artifactId>
                            <version>${version.org.asciidoctor.asciidoctorj-pdf}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${version.sonar.plugin}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <distributionManagement>
        <repository>
            <id>${jboss.releases.repo.id}</id>
            <name>JBoss Releases Repository</name>
            <url>${jboss.releases.repo.url}</url>
        </repository>
        <snapshotRepository>
            <id>${jboss.snapshots.repo.id}</id>
            <name>JBoss Snapshots Repository</name>
            <url>${jboss.snapshots.repo.url}</url>
        </snapshotRepository>
    </distributionManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${version.project-info.plugin}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>com.github.siom79.japicmp</groupId>
                <artifactId>japicmp-maven-plugin</artifactId>
                <version>${version.japicmp.plugin}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>cmp-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <skip>true</skip>
                    <oldVersion>
                        <dependency>
                            <groupId>org.hibernate.search</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <version>${version.org.hibernate.search.previous-stable}</version>
                            <type>${project.packaging}</type>
                        </dependency>
                    </oldVersion>
                    <newVersion>
                        <file>
                            <path>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</path>
                        </file>
                    </newVersion>
                    <parameter>
                        <onlyModified>true</onlyModified>
                        <excludes>
                            <exclude>org.hibernate.search.*.impl</exclude>
                        </excludes>
                        <accessModifier>public</accessModifier>
                        <!--
                            The next two should make sure that this report is not run for this POM-packaged parent module itself
                            That's not working, though, resulting a build failure. I'm thus setting skip to "true" below, which
                            needs to be overridden within those modules for which this report should be created
                        -->
                        <skipPomModules>true</skipPomModules>
                        <packagingSupporteds>
                            <packagingSupported>jar</packagingSupported>
                        </packagingSupporteds>
                    </parameter>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>dist</id>
            <modules>
                <module>distribution</module>
            </modules>
        </profile>

        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <modules>
                <!-- Nothing at the moment -->
            </modules>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                <failOnWarning>false</failOnWarning>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>testWithJdk11+</id>
            <activation>
                <property>
                    <name>maven.compiler.testRelease</name>
                    <value>!8</value>
                </property>
            </activation>
            <properties>
                <surefire.jvm.args.java-version>
                    -Djdk.attach.allowAttachSelf=true
                    --illegal-access=deny
                </surefire.jvm.args.java-version>
            </properties>
        </profile>

        <profile>
            <id>jdk15+</id>
            <activation>
                <jdk>[15,)</jdk>
            </activation>
            <build>
                <!--
                     maven-surefire-plugin and maven-failsafe-plugin use an older version of ASM
                     that cannot handle Java 15+ bytecode.
                     Let's upgrade that dependency and hope for the best;
                     if it doesn't work, the build is very likely to fail and we'll know about it.
                 -->
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <dependencies>
                                <dependency>
                                    <groupId>org.ow2.asm</groupId>
                                    <artifactId>asm</artifactId>
                                    <version>${version.surefire.plugin.java-version.asm}</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <dependencies>
                                <dependency>
                                    <groupId>org.ow2.asm</groupId>
                                    <artifactId>asm</artifactId>
                                    <version>${version.surefire.plugin.java-version.asm}</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>jdk16+</id>
            <activation>
                <jdk>[16,)</jdk>
            </activation>
            <properties>
                <!-- ForbiddenAPIs doesn't provide bundled signatures for JDK16... yet. -->
                <forbiddenapis.skip>true</forbiddenapis.skip>
                <!--
                    We need net.bytebuddy.experimental=true
                    to make BytecodeEnhancementIT pass
                 -->
                <surefire.jvm.args.java-version>
                    -Djdk.attach.allowAttachSelf=true
                    -Dnet.bytebuddy.experimental=true
                    --illegal-access=deny
                </surefire.jvm.args.java-version>
                <!-- Spring isn't ready for JDK16 yet -->
                <failsafe.spring.skip>true</failsafe.spring.skip>
            </properties>
        </profile>

        <profile>
            <id>compiler-eclipse</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                <compilerId>eclipse</compilerId>
                                <!-- ECJ doesn't seem to understand the "release" argument -->
                                <release></release>
                                <source>${maven.compiler.release}</source>
                                <target>${maven.compiler.release}</target>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>org.codehaus.plexus</groupId>
                                    <artifactId>plexus-compiler-eclipse</artifactId>
                                    <version>${version.org.codehaus.plexus.plexus-compiler-eclipse}</version>
                                </dependency>
                                <dependency>
                                    <groupId>org.eclipse.jdt</groupId>
                                    <artifactId>ecj</artifactId>
                                    <version>${version.org.eclipse.jdt.ecj}</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
            <pluginRepositories>
                <!--
                     This is needed to access pre-release versions of ECJ,
                     when bugs that affect us are fixed but not yet released.
                     It's been used in particular to get a fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=547807.
                     This configuration *MUST STAY IN A SPECIFIC PROFILE*,
                     otherwise it would "taint" projects that depend on Hibernate Search.
                 -->
                <pluginRepository>
                    <id>${eclipse.repo.id}</id>
                    <url>${eclipse.repo.url}</url>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>never</updatePolicy>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>

        <profile>
            <id>perf</id>
            <properties>
                <org.hibernate.search.enable_performance_tests>true</org.hibernate.search.enable_performance_tests>
            </properties>
        </profile>

        <profile>
            <id>IDEA</id>
            <!--
            Dependencies to allow easy project import in IntelliJ IDEA.
            These should not be listed as project dependencies to users
            but are necessary during compile time as they include the
            JBoss Logger annotation processor.
            -->
            <activation>
                <!-- This is a trick to have the profile automatically activated by IDEA -->
                <property>
                    <name>idea.maven.embedder.version</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-processor</artifactId>
                    <version>${version.org.jboss.logging.jboss-logging-tools}</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>org.openjdk.jmh</groupId>
                    <artifactId>jmh-generator-annprocess</artifactId>
                    <version>${version.org.openjdk.jmh}</version>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>eclipse</id>
            <activation>
                <property>
                    <!-- This is a trick to have the profile automatically activated by Eclipse -->
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <!--
                                This plugin's configuration is used in m2e only.
                                We want to configure this in a separate profile because the plugin doesn't really exist
                                and Maven will complain because it doesn't find it if executed outside of Eclipse.
                             -->
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>${version.org.eclipse.m2e.lifecycle-mapping}</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-dependency-plugin</artifactId>
                                                <versionRange>[2.1,)</versionRange>
                                                <goals>
                                                    <goal>unpack</goal>
                                                    <goal>unpack-dependencies</goal>
                                                    <goal>build-classpath</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.felix</groupId>
                                                <artifactId>maven-bundle-plugin</artifactId>
                                                <versionRange>[2.3.7,)</versionRange>
                                                <goals>
                                                    <goal>manifest</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.codehaus.mojo</groupId>
                                                <artifactId>build-helper-maven-plugin</artifactId>
                                                <versionRange>[1.9.1,)</versionRange>
                                                <goals>
                                                    <goal>parse-version</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>de.thetaphi</groupId>
                                                <artifactId>forbiddenapis</artifactId>
                                                <versionRange>[3.1,)</versionRange>
                                                <goals>
                                                    <goal>check</goal>
                                                    <goal>testCheck</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>
                                                    org.asciidoctor
                                                </groupId>
                                                <artifactId>
                                                    asciidoctor-maven-plugin
                                                </artifactId>
                                                <versionRange>
                                                    [1.5.6,)
                                                </versionRange>
                                                <goals>
                                                    <goal>
                                                        process-asciidoc
                                                    </goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore></ignore>
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>coverage</id>
            <properties>
                <!--
                    Caution, we use @{...} for late property evaluation here:
                    http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#late-property-evaluation
                    This is necessary for Jacoco to work as expected.
                    However, we wrap the @{...} references into two early-evaluated properties
                    because in certain environments (IntelliJ IDEA), the use of late property evaluation
                    is not supported and breaks test execution.
                    This is because IntelliJ tries to parse the POM to retrieve the surefire/failsafe
                    argLine and pass them to the test execution directly,
                    but then fails to evaluate "@{...}" references, resulting in errors.
                    As a result, this profile will not work in IntelliJ,
                    but we don't need JaCoCo in IntelliJ anyway.
                 -->
                <surefire.jvm.args.jacoco>@{surefire.jvm.args.jacoco.lateEval}</surefire.jvm.args.jacoco>
                <failsafe.jvm.args.jacoco>@{failsafe.jvm.args.jacoco.lateEval}</failsafe.jvm.args.jacoco>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>**/*_$logger.class</exclude>
                                <exclude>**/*_$bundle.class</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>jacoco-prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>surefire.jvm.args.jacoco.lateEval</propertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>jacoco-prepare-prepare-agent-integration</id>
                                <!--
                                    This is necessary in order for the property to be set before we process resources,
                                    such as arquillian.xml in WildFly tests or maven.properties in OSGi tests.
                                 -->
                                <phase>initialize</phase>
                                <goals>
                                    <goal>prepare-agent-integration</goal>
                                </goals>
                                <configuration>
                                    <propertyName>failsafe.jvm.args.jacoco.lateEval</propertyName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!--
            A profile executing jqassistant scanning and analysis for all relevant modules.
            Our rules are in jqassistant/rules.xml.
            See README.md for usage.
        -->
        <profile>
            <id>jqassistant</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>jqassistant-maven-plugin</artifactId>
                        <version>${version.com.buschmais.jqassistant.plugin}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>scan</goal>
                                    <goal>analyze</goal>
                                </goals>
                                <configuration>
                                    <warnOnSeverity>INFO</warnOnSeverity>
                                    <failOnSeverity>MAJOR</failOnSeverity>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>owasp</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <version>${version.dependency-check.plugin}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!--
             WARNING: this MUST be the very last profile,
             so that the "report" module is the very last module,
             in particular when deploying artifacts to a Nexus repository.
             See the "reports" module POM for more information.
         -->
        <profile>
            <id>report-as-last-module</id>
            <activation>
                <property>
                    <name>!some.property.that.will.never.exist</name>
                </property>
            </activation>
            <modules>
                <module>reports</module>
            </modules>
        </profile>

        <!-- DO NOT ADD ANY PROFILE AFTER THIS: see above -->
    </profiles>
</project>
