<?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</groupId>
    <artifactId>hibernate-search-parent</artifactId>
    <version>5.10.7.Final</version>
    <packaging>pom</packaging>

    <name>Hibernate Search Aggregator</name>
    <description>Hibernate Search Aggregator POM</description>
    <url>http://search.hibernate.org</url>

    <inceptionYear>2006</inceptionYear>

    <modules>
        <module>build-config</module>
        <module>sharedtestresources</module>
        <module>legacy</module>
        <module>engine</module>
        <module>serialization/avro</module>
        <module>backends/jgroups</module>
        <module>backends/jms</module>
        <module>elasticsearch</module>
        <module>elasticsearch-aws</module>
        <module>orm</module>
        <module>jsr352</module>
        <module>testing</module>
        <module>infinispan</module>
        <module>jbossmodules</module>
        <module>integrationtest/elasticsearch</module>
        <module>integrationtest/wildfly</module>
        <module>integrationtest/jms</module>
        <module>integrationtest/narayana</module>
        <module>integrationtest/spring</module>
        <module>integrationtest/osgi/karaf-features</module>
        <module>integrationtest/osgi/karaf-it</module>
        <module>integrationtest/jsr352</module>
        <module>integrationtest/performance/orm</module>
        <module>integrationtest/performance/sandbox</module>
        <module>integrationtest/performance/engine-lucene</module>
        <module>integrationtest/performance/engine-elasticsearch</module>
        <module>documentation</module>
        <module>reports</module>
    </modules>

    <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>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>

    <properties>
        <!-- Version to be used as baseline for API/SPI change reports -->
        <previous.stable>5.9.0.Final</previous.stable>

        <!-- Dependencies versions -->

        <version.org.hibernate>5.3.12.Final</version.org.hibernate>
        <version.org.hibernate.commons.annotations>5.0.5.Final</version.org.hibernate.commons.annotations>
        <version.javax.persistence>2.2</version.javax.persistence>

        <version.org.apache.lucene>5.5.5</version.org.apache.lucene>
        <version.feature-pack.org.apache.lucene>5.5.5.hibernate06</version.feature-pack.org.apache.lucene>

        <version.org.apache.tika>1.4</version.org.apache.tika>
        <version.org.apache.pdfbox>1.8.1</version.org.apache.pdfbox>

        <version.org.infinispan>9.2.2.Final</version.org.infinispan>

        <version.wildfly>17.0.1.Final</version.wildfly>

        <version.org.jboss.spec.javax.jms.jboss-jms-api_2.0_spec>1.0.2.Final</version.org.jboss.spec.javax.jms.jboss-jms-api_2.0_spec>
        <version.org.apache.activemq.broker>5.13.3</version.org.apache.activemq.broker>
        <version.org.jgroups>4.0.11.Final</version.org.jgroups>

        <version.org.apache.commons.codec>1.10</version.org.apache.commons.codec>
        <version.org.apache.commons.compress>1.5</version.org.apache.commons.compress>
        <version.org.apache.commons.io>2.1</version.org.apache.commons.io>
        <version.org.apache.commons.lang>2.6</version.org.apache.commons.lang>
        <version.org.apache.commons.lang3>3.5</version.org.apache.commons.lang3>
        <version.org.apache.commons.logging>1.1.3</version.org.apache.commons.logging>
        <version.org.apache.httpcomponents.httpclient>4.5.2</version.org.apache.httpcomponents.httpclient>
        <version.org.apache.httpcomponents.httpcore>4.4.4</version.org.apache.httpcomponents.httpcore>
        <version.org.apache.avro>1.7.6</version.org.apache.avro>
        <version.org.codehaus.jackson>1.9.13</version.org.codehaus.jackson>
        <version.xml-apis>1.3.03</version.xml-apis>

        <version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.3_spec>1.0.1.Final</version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.3_spec>
        <version.org.jboss.spec.javax.ejb.jboss-ejb-api_3.2_spec>1.0.2.Final</version.org.jboss.spec.javax.ejb.jboss-ejb-api_3.2_spec>
        <version.org.jboss.ejb3.ext-api>2.3.0.Final</version.org.jboss.ejb3.ext-api>
        <version.javax.inject>1</version.javax.inject>
        <version.javax.enterprise>2.0.SP1</version.javax.enterprise>
        <version.org.jboss.narayana>5.9.5.Final</version.org.jboss.narayana>
        <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>
        <version.org.jboss.jboss-transaction-spi>7.6.0.Final</version.org.jboss.jboss-transaction-spi>

        <!-- Elasticsearch -->
        <!-- When updating the following versions you will likely need to update the
             matching test profile as well, e.g. elasticsearch-5.2 for the 5.2+ series -->
        <version.org.elasticsearch.client>5.6.8</version.org.elasticsearch.client>
        <version.feature-pack.org.elasticsearch.client>5.6.8.hibernate02</version.feature-pack.org.elasticsearch.client>
        <version.com.google.code.gson>2.8.5</version.com.google.code.gson>
        <version.feature-pack.com.google.code.gson>2.8.5.hibernate02</version.feature-pack.com.google.code.gson>
        <version.uk.co.lucasweb.aws-v4-signer-java>1.3</version.uk.co.lucasweb.aws-v4-signer-java>
        <version.feature-pack.uk.co.lucasweb.aws-v4-signer-java>1.3.0.hibernate04</version.feature-pack.uk.co.lucasweb.aws-v4-signer-java>

        <!-- JSR 352 -->
        <version.javax.batch>1.0</version.javax.batch>
        <!-- in line with the version used in WildFly 17 -->
        <version.org.jberet>1.3.4.Final</version.org.jberet>
        <!-- they didn't publish the javadoc for the other 1.3.x -->
        <version.org.jberet.javadoc>1.3.0.Final</version.org.jberet.javadoc>
        <version.com.ibm.jbatch>1.0</version.com.ibm.jbatch>
        <!-- Derby driver used by JBatch -->
        <version.org.apache.derby>10.13.1.1</version.org.apache.derby>

        <version.org.slf4j>1.7.25</version.org.slf4j>
        <version.log4j>1.2.16</version.log4j>
        <version.org.jboss.logging.jboss-logging>3.3.2.Final</version.org.jboss.logging.jboss-logging>
        <version.org.jboss.logging.jboss-logging-tools>2.1.0.Final</version.org.jboss.logging.jboss-logging-tools>

        <!-- Test dependencies -->

        <version.junit>4.12</version.junit>
        <version.org.easymock>3.6</version.org.easymock>
        <version.org.unitils>3.4.6</version.org.unitils>
        <version.simple-jndi>0.11.4.1</version.simple-jndi>
        <version.org.assertj.assertj-core>3.9.1</version.org.assertj.assertj-core>
        <version.org.skyscreamer.jsonassert>1.2.3</version.org.skyscreamer.jsonassert>
        <version.com.github.tomakehurst.wiremock>2.5.1</version.com.github.tomakehurst.wiremock>
        <!-- Fixes dependency convergence within Wiremock, see below -->
        <version.com.fasterxml.jackson>2.8.6</version.com.fasterxml.jackson>
        <version.org.jboss.byteman>4.0.7</version.org.jboss.byteman>
        <version.io.takari.junit>1.2.7</version.io.takari.junit>
        <version.com.h2database>1.4.178</version.com.h2database>

        <!-- Integration tests -->

        <version.org.openjdk.jmh>1.20</version.org.openjdk.jmh>
        <version.org.jboss.arquillian>1.4.0.Final</version.org.jboss.arquillian>
        <version.org.wildfly.arquillian>2.1.1.Final</version.org.wildfly.arquillian>
        <version.org.springframework.boot>2.1.0.RELEASE</version.org.springframework.boot>
        <version.org.apache.karaf>4.2.1</version.org.apache.karaf>
        <version.org.ops4j.pax.exam>4.12.0</version.org.ops4j.pax.exam>
        <version.org.ops4j.pax.url>2.5.4</version.org.ops4j.pax.url>

        <!-- OSGi ranges for some primary dependencies -->

        <!-- Warning:
            Ranges are maintained as best effort on our knowledge but only the
            exact versions in this pom are being tested.
            Essentially we allow older versions when we know no changes were necessary when we upgraded the dependency. -->
        <osgi.version-range.org.apache.lucene>[5.3.0,5.6.0)</osgi.version-range.org.apache.lucene>
        <osgi.version-range.org.hibernate>[5.3.0,5.4.0)</osgi.version-range.org.hibernate>
        <osgi.version-range.org.hibernate.commons.annotations>[5,6)</osgi.version-range.org.hibernate.commons.annotations>
        <osgi.version-range.org.jgroups>[3.6.0,4)</osgi.version-range.org.jgroups>
        <osgi.version-range.org.jboss.logging.jboss-logging>[3.3,4.0.0)</osgi.version-range.org.jboss.logging.jboss-logging>
        <osgi.version-range.org.apache.tika>[1.4,2.0)</osgi.version-range.org.apache.tika>
        <osgi.version-range.org.apache.avro>[${version.org.apache.avro},1.8.0)</osgi.version-range.org.apache.avro>

        <!-- Elasticsearch tests properties -->

        <test.elasticsearch.java_home>${java.home}</test.elasticsearch.java_home>
        <test.elasticsearch.host.url>http://localhost:9200</test.elasticsearch.host.url>
        <test.elasticsearch.host.username></test.elasticsearch.host.username>
        <test.elasticsearch.host.password></test.elasticsearch.host.password>

        <!-- Maven plugins versions -->

        <version.assembly.plugin>3.1.0</version.assembly.plugin>
        <version.buildhelper.plugin>3.0.0</version.buildhelper.plugin>
        <version.bundle.plugin>3.3.0</version.bundle.plugin>
        <version.checkstyle.plugin>2.17</version.checkstyle.plugin>
        <version.clean.plugin>3.0.0</version.clean.plugin>
        <version.copy.plugin>0.0.5</version.copy.plugin>
        <version.compiler.plugin>3.7.0</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.dependencypath.plugin>1.1.1</version.dependencypath.plugin>
        <version.depends.plugin>1.3.1</version.depends.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-M1</version.enforcer.plugin>
        <version.forbiddenapis.plugin>2.6</version.forbiddenapis.plugin>
        <version.help.plugin>2.2</version.help.plugin>
        <version.install.plugin>2.5.2</version.install.plugin>
        <version.japicmp.plugin>0.9.3</version.japicmp.plugin>
        <version.jar.plugin>3.0.2</version.jar.plugin>
        <version.javadoc.plugin>3.0.0</version.javadoc.plugin>
        <version.jdeps.plugin>0.4.0</version.jdeps.plugin>
        <version.nexus.plugin>2.1</version.nexus.plugin>
        <version.processor.plugin>3.2.0</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>2.21.0</version.surefire.plugin>
        <version.failsafe.plugin>${version.surefire.plugin}</version.failsafe.plugin>
        <version.org.wildfly.build-tools>1.2.11.Final</version.org.wildfly.build-tools>
        <version.jacoco.plugin>0.8.3</version.jacoco.plugin>
        <version.coveralls.plugin>4.3.0</version.coveralls.plugin>
        <version.org.jboss.bridger.plugin>1.5.Final</version.org.jboss.bridger.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.8</puppycrawl.checkstyle.version>

        <!-- Asciidoctor -->

        <version.asciidoctor.plugin>1.5.6</version.asciidoctor.plugin>
        <version.org.hibernate.infra.hibernate-asciidoctor-theme>1.0.2.Final</version.org.hibernate.infra.hibernate-asciidoctor-theme>
        <version.org.jruby>9.1.15.0</version.org.jruby>
        <version.org.asciidoctor.asciidoctorj>1.5.6</version.org.asciidoctor.asciidoctorj>
        <version.org.asciidoctor.asciidoctorj-pdf>1.5.0-alpha.16</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>

        <!-- 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.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>

        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.testTarget>${maven.compiler.target}</maven.compiler.testTarget>
        <maven.compiler.testSource>${maven.compiler.source}</maven.compiler.testSource>
        <!--
                Options to override the compiler arguments directly on the compiler argument line to separate between what
                the IDE understands as the source level and what the Maven compiler actually use.
        -->
        <maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target>
        <maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source>
        <maven.compiler.argument.testTarget>${maven.compiler.testTarget}</maven.compiler.argument.testTarget>
        <maven.compiler.argument.testSource>${maven.compiler.testSource}</maven.compiler.argument.testSource>

        <surefire.jvm.args.memory>-Xmx512m -Xms128m</surefire.jvm.args.memory>
        <!-- Set empty default values to avoid Maven leaving property references (${...}) when it doesn't find a value -->
        <!--
            Provide two sets of settings for settings specific to a java version.
            This is mainly useful when running tests in Arquillian, where illegal-access=deny won't work
            and is not useful, so we disable it.
         -->
        <surefire.jvm.args.java-version.strict></surefire.jvm.args.java-version.strict>
        <surefire.jvm.args.java-version.lenient></surefire.jvm.args.java-version.lenient>
        <surefire.jvm.args.java-version>${surefire.jvm.args.java-version.strict}</surefire.jvm.args.java-version>
        <surefire.jvm.args.jacoco></surefire.jvm.args.jacoco>
        <failsafe.jvm.args.jacoco></failsafe.jvm.args.jacoco>
        <surefire.jvm.args>${surefire.jvm.args.memory} ${surefire.jvm.args.java-version} ${surefire.jvm.args.jacoco}</surefire.jvm.args>
        <failsafe.jvm.args>${surefire.jvm.args.memory} ${surefire.jvm.args.java-version} ${failsafe.jvm.args.jacoco}</failsafe.jvm.args>

        <failsafe.wildfly.skip>false</failsafe.wildfly.skip>
        <failsafe.osgi.skip>false</failsafe.osgi.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>

        <arquillian.wildfly.jvm.args.java-version></arquillian.wildfly.jvm.args.java-version>
        <arquillian.wildfly.jvm.args.jacoco></arquillian.wildfly.jvm.args.jacoco>
        <!--
          The arguments below are JBoss modules settings taken from
          https://github.com/jboss-modules/jboss-modules/blob/5b4744e74f35cbab23536e3e52c0724fdbbedcb7/src/main/java/org/jboss/modules/maven/MavenSettings.java#L264
          - remote.maven.repo: necessary for the WF provisioning to work when the JBoss Nexus is not in the user's settings
          - maven.repo.local: necessary for the WF provisioning to work when using a non-default local repository
         -->
        <arquillian.wildfly.jvm.args.jbossmodules>
            -Dremote.maven.repo=${jboss.public.repo.url}
            -Dmaven.repo.local=${settings.localRepository}
        </arquillian.wildfly.jvm.args.jbossmodules>
        <arquillian.wildfly.jvm.args>${arquillian.wildfly.jvm.args.java-version} ${arquillian.wildfly.jvm.args.jacoco} ${arquillian.wildfly.jvm.args.jbossmodules}</arquillian.wildfly.jvm.args>

        <pax-exam.jvm.args.java-version></pax-exam.jvm.args.java-version>
        <pax-exam.jvm.args.jacoco></pax-exam.jvm.args.jacoco>
        <pax-exam.jvm.args>${pax-exam.jvm.args.java-version} ${pax-exam.jvm.args.jacoco}</pax-exam.jvm.args>

        <!-- JDK version required for the build; we target 1.8 since Hibernate ORM 5.3 requires Java 8 -->
        <jdk.min.version>${maven.compiler.argument.source}</jdk.min.version>
        <maven.min.version>3.2.3</maven.min.version>

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

        <!-- Eclipse plugin options -->

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

    <dependencyManagement>
        <dependencies>
            <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</groupId>
                <artifactId>hibernate-testing</artifactId>
                <version>${version.org.hibernate}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.jbossts</groupId>
                        <artifactId>jbossjta</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.experlog</groupId>
                        <artifactId>xapool</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate.common</groupId>
                <artifactId>hibernate-commons-annotations</artifactId>
                <version>${version.org.hibernate.commons.annotations}</version>
            </dependency>
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>javax.persistence-api</artifactId>
                <version>${version.javax.persistence}</version>
            </dependency>
            <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-backward-codecs</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-misc</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>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-sandbox</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-analyzers-phonetic</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-spellchecker</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>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-grouping</artifactId>
                <version>${version.org.apache.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parsers</artifactId>
                <version>${version.org.apache.tika}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.gagravarr</groupId>
                        <artifactId>vorbis-java-tika</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>edu.ucar</groupId>
                        <artifactId>netcdf</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.james</groupId>
                        <artifactId>apache-mime4j-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.james</groupId>
                        <artifactId>apache-mime4j-dom</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-compress</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-codec</groupId>
                        <artifactId>commons-codec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.pdfbox</groupId>
                        <artifactId>pdfbox</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.poi</groupId>
                        <artifactId>poi</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.poi</groupId>
                        <artifactId>poi-scratchpad</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.poi</groupId>
                        <artifactId>poi-ooxml</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.bouncycastle</groupId>
                        <artifactId>bcmail-jdk15</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.bouncycastle</groupId>
                        <artifactId>bcprov-jdk15</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-stax-api_1.0_spec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.ccil.cowan.tagsoup</groupId>
                        <artifactId>tagsoup</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-debug-all</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.googlecode.mp4parser</groupId>
                        <artifactId>isoparser</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.drewnoakes</groupId>
                        <artifactId>metadata-extractor</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>de.l3s.boilerpipe</groupId>
                        <artifactId>boilerpipe</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>rome</groupId>
                        <artifactId>rome</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.gagravarr</groupId>
                        <artifactId>vorbis-java-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.googlecode.juniversalchardet</groupId>
                        <artifactId>juniversalchardet</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-core</artifactId>
                <version>${version.org.apache.tika}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.pdfbox</groupId>
                <artifactId>pdfbox</artifactId>
                <version>${version.org.apache.pdfbox}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro</artifactId>
                <version>${version.org.apache.avro}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.xerial.snappy</groupId>
                        <artifactId>snappy-java</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.tukaani</groupId>
                        <artifactId>xz</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <!-- To force testing of Apache Avro integration with the version of Jackson used in WildFly -->
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-core-asl</artifactId>
                <version>${version.org.codehaus.jackson}</version>
            </dependency>
            <dependency>
                <!-- To force testing of Apache Avro integration with the version of Jackson used in WildFly -->
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>${version.org.codehaus.jackson}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${version.org.apache.commons.compress}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${version.org.apache.commons.io}</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${version.org.apache.commons.lang}</version>
            </dependency>
            <dependency>
                <!-- Dependency management is necessary for Wiremock in particular (it has internal dependency convergence) -->
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${version.org.apache.commons.lang3}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${version.org.apache.httpcomponents.httpclient}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>${version.org.apache.httpcomponents.httpcore}</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${version.org.apache.commons.codec}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-serialization-avro</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-backend-jms</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-backend-jgroups</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-infinispan</artifactId>
                <version>${project.version}</version>
            </dependency>
             <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-orm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-orm</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-engine</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-jbossmodules-engine</artifactId>
                <version>${project.version}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>hibernate-search-jbossmodules-orm</artifactId>
                <version>${project.version}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-jbossmodules-elasticsearch</artifactId>
                <version>${project.version}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>hibernate-search-jbossmodules-elasticsearch-aws</artifactId>
                <version>${project.version}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-orm-jbossmodules</artifactId>
                <version>${version.org.hibernate}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>hibernate-search-jbossmodules-testing</artifactId>
                <version>${project.version}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-sharedtestresources</artifactId>
                <classifier>build-resources</classifier>
                <type>zip</type>
                <version>${project.version}</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-engine</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-testing</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-documentation</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-elasticsearch</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-elasticsearch-aws</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-jsr352-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-jsr352-core</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-jsr352-jberet</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jberet</groupId>
                <artifactId>jberet-core</artifactId>
                <version>${version.org.jberet}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${version.org.apache.commons.logging}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-broker</artifactId>
                <version>${version.org.apache.activemq.broker}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec.javax.jms</groupId>
                <artifactId>jboss-jms-api_2.0_spec</artifactId>
                <version>${version.org.jboss.spec.javax.jms.jboss-jms-api_2.0_spec}</version>
            </dependency>
            <dependency>
                <groupId>org.jgroups</groupId>
                <artifactId>jgroups</artifactId>
                <version>${version.org.jgroups}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec.javax.annotation</groupId>
                <artifactId>jboss-annotations-api_1.3_spec</artifactId>
                <version>${version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.3_spec}</version>
            </dependency>
            <dependency>
                <groupId>javax.batch</groupId>
                <artifactId>javax.batch-api</artifactId>
                <version>${version.javax.batch}</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>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>${version.javax.enterprise}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec.javax.ejb</groupId>
                <artifactId>jboss-ejb-api_3.2_spec</artifactId>
                <version>${version.org.jboss.spec.javax.ejb.jboss-ejb-api_3.2_spec}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.ejb3</groupId>
                <artifactId>jboss-ejb3-ext-api</artifactId>
                <version>${version.org.jboss.ejb3.ext-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>${version.org.easymock}</version>
            </dependency>
            <dependency>
                <groupId>org.unitils</groupId>
                <artifactId>unitils-easymock</artifactId>
                <version>${version.org.unitils}</version>
            </dependency>
            <dependency>
                <groupId>simple-jndi</groupId>
                <artifactId>simple-jndi</artifactId>
                <version>${version.simple-jndi}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.org.assertj.assertj-core}</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>
            </dependency>
            <!--
                Fix dependency convergence within jackson-databind 2.6 (used by wiremock).
                Jackson databind 2.6.x has a packaging issue: it depends on jackson-annotations:2.6.0
                for every version of databind (2.6.1, 2.6.2, ...).
                We solve this by managing the version of jackson ourselves. 
             -->
            <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}</version>
            </dependency>
            <!--
            We need to keep the slf4j dependencies listed here even though we are not using slf4j anymore.
            Listing them within dependencyManagement will ensure that ${slf4jVersion} is used as slf4j version
            for transitive dependencies
            -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.org.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${version.org.slf4j}</version>
            </dependency>
            
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${version.log4j}</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>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman</artifactId>
                <version>${version.org.jboss.byteman}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-install</artifactId>
                <version>${version.org.jboss.byteman}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-bmunit</artifactId>
                <version>${version.org.jboss.byteman}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.narayana.jta</groupId>
                <artifactId>narayana-jta</artifactId>
                <version>${version.org.jboss.narayana}</version>
            </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>
            </dependency>
            <dependency>
                <groupId>org.jboss</groupId>
                <artifactId>jboss-transaction-spi</artifactId>
                <version>${version.org.jboss.jboss-transaction-spi}</version>
            </dependency>

            <!-- Manage version of xml-apis to have dom4j and Tika requirements converge -->
            <dependency>
                <groupId>xml-apis</groupId>
                <artifactId>xml-apis</artifactId>
                <version>${version.xml-apis}</version>
            </dependency>
            <dependency>
                <groupId>io.takari.junit</groupId>
                <artifactId>takari-cpsuite</artifactId>
                <version>${version.io.takari.junit}</version>
            </dependency>

            <!-- JDBC drivers -->
            <!-- Profile-specific driver, used in most database-sensitive integration tests -->
            <dependency>
                <groupId>${jdbc.driver.groupId}</groupId>
                <artifactId>${jdbc.driver.artifactId}</artifactId>
                <version>${jdbc.driver.version}</version>
            </dependency>
            <!-- H2 driver, used in some integration tests regardless of the database profile -->
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${version.com.h2database}</version>
            </dependency>

            <!-- External WildFly feature packs (to build our own feature packs) -->
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-feature-pack</artifactId>
                <type>zip</type>
                <version>${version.wildfly}</version>
                <!-- We just need the ZIP, not the dependencies -->
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate.lucene-jbossmodules</groupId>
                <artifactId>lucene-jbossmodules</artifactId>
                <type>zip</type>
                <version>${version.feature-pack.org.apache.lucene}</version>
                <!-- We just need the ZIP, not the dependencies -->
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate.elasticsearch-client-jbossmodules</groupId>
                <artifactId>elasticsearch-client-jbossmodules</artifactId>
                <type>zip</type>
                <version>${version.feature-pack.org.elasticsearch.client}</version>
                <!-- We just need the ZIP, not the dependencies -->
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate.gson-jbossmodules</groupId>
                <artifactId>gson-jbossmodules</artifactId>
                <type>zip</type>
                <version>${version.feature-pack.com.google.code.gson}</version>
                <!-- We just need the ZIP, not the dependencies -->
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate.aws-v4-signer-java-jbossmodules</groupId>
                <artifactId>aws-v4-signer-java-jbossmodules</artifactId>
                <type>zip</type>
                <version>${version.feature-pack.uk.co.lucasweb.aws-v4-signer-java}</version>
                <!-- We just need the ZIP, not the dependencies -->
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <showWarnings>true</showWarnings>
                    <source>${maven.compiler.argument.source}</source>
                    <target>${maven.compiler.argument.target}</target>
                    <testSource>${maven.compiler.argument.testSource}</testSource>
                    <testTarget>${maven.compiler.argument.testTarget}</testTarget>
                    <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>
                <!-- This defines the properties 'parsedVersion.majorVersion'
                    and 'parsedVersion.minorVersion' to be in synch with the current project version -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <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-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-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-aws-v4-signer-java-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsed-version.uk.co.lucasweb.aws-v4-signer-java</propertyPrefix>
                            <versionString>${version.uk.co.lucasweb.aws-v4-signer-java}</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>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-maven-plugin</artifactId>
                <configuration>
                    <nexusUrl>https://repository.jboss.org/nexus</nexusUrl>
                    <automatic>true</automatic>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Implementation-Vendor>hibernate.org</Implementation-Vendor>
                            <Implementation-Vendor-Id>hibernate.org</Implementation-Vendor-Id>
                            <Implementation-URL>http://search.hibernate.org</Implementation-URL>
                        </manifestEntries>
                    </archive>
                    <skipIfEmpty>true</skipIfEmpty>
                </configuration>
                <executions>
                    <execution>
                        <id>build-test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                </manifest>
                            </archive>
                            <excludes>
                                <exclude>**/hibernate.properties</exclude>
                                <exclude>**/log4j.properties</exclude>
                                <exclude>**/META-INF/persistence.xml</exclude>
                            </excludes>
                        </configuration>
                    </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>
                                    <!-- require JDK 1.8 to run the build -->
                                    <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</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>
                <plugin>
                    <groupId>org.wildfly.build</groupId>
                    <artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
                    <version>${version.org.wildfly.build-tools}</version>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.build</groupId>
                    <artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
                    <version>${version.org.wildfly.build-tools}</version>
                </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>
                    <!-- Needing 3.6.2 at least because of MCOMPILER-294 -->
                    <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>
                                <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>-source ${maven.compiler.argument.source} -target ${maven.compiler.argument.target} -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-maven-plugin</artifactId>
                    <version>${version.nexus.plugin}</version>
                </plugin>
                <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>
                        <systemPropertyVariables>
                            <!-- See HSEARCH-1444 -->
                            <hibernate.service.allow_crawling>false</hibernate.service.allow_crawling>
                            <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>
                        <argLine>${surefire.jvm.args}</argLine>
                        <additionalClasspathElements>
                            <!-- Needed by Byteman to load the agent on demand -->
                            <additionalClasspathElement>${jdk-toolsjar}</additionalClasspathElement>
                        </additionalClasspathElements>
                        <reportNameSuffix>${surefire.environment}-${surefire.executing-module}</reportNameSuffix>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>${version.asciidoctor.plugin}</version>
                    <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>ch.mfrey.maven.plugin</groupId>
                    <artifactId>copy-maven-plugin</artifactId>
                    <version>${version.copy.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>
                    <configuration>
                        <!-- Fail on error alternative -->
                        <!-- <additionalparam>-Xdoclint:none</additionalparam> -->
                        <quiet>true</quiet>
                        <verbose>false</verbose>
                        <failOnError>${failOnJavaDocError}</failOnError>
                        <!-- Exclude implementation classes from the javadoc -->
                        <excludePackageNames>*.impl,*.impl.*</excludePackageNames>
                        <links>
                            <link>http://download.oracle.com/javase/8/docs/api/</link>
                            <link>http://docs.jboss.org/hibernate/orm/5.3/javadocs/</link>
                            <link>http://lucene.apache.org/core/5_5_4/core/</link>
                            <link>http://lucene.apache.org/core/5_5_4/analyzers-common/</link>
                            <link>http://lucene.apache.org/core/5_5_4/queryparser/</link>
                            <link>http://jgroups.org/javadoc/</link>
                            <!-- for javax.batch in the JSR 352 modules -->
                            <link>https://docs.oracle.com/javaee/7/api/</link>
                            <link>http://docs.jboss.org/jberet/${version.org.jberet.javadoc}/javadoc/jberet-core/</link>
                        </links>
                        <bottom>
                            <![CDATA[Copyright &copy; ${project.inceptionYear}-{currentYear} <a href="https://www.redhat.com/">Red Hat, Inc.</a> and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.]]>
                        </bottom>
                        <additionalDependencies>
                            <additionalDependency>
                                <groupId>org.jboss.logging</groupId>
                                <artifactId>jboss-logging-annotations</artifactId>
                                <version>${version.org.jboss.logging.jboss-logging-tools}</version>
                            </additionalDependency>
                        </additionalDependencies>
                        <tags>
                            <tag>
                                <name>hsearch.experimental</name>
                                <placement>a</placement>
                                <head>Experimental</head>
                            </tag>
                        </tags>
                    </configuration>
                </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-failsafe-plugin</artifactId>
                    <version>${version.failsafe.plugin}</version>
                    <configuration>
                        <forkCount>1</forkCount>
                        <reuseForks>true</reuseForks>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <runOrder>alphabetical</runOrder>
                        <systemPropertyVariables>
                            <!-- See HSEARCH-1444 -->
                            <hibernate.service.allow_crawling>false</hibernate.service.allow_crawling>
                            <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>
                        <argLine>${failsafe.jvm.args}</argLine>
                        <additionalClasspathElements>
                            <!-- Needed by Byteman to load the agent on demand -->
                            <additionalClasspathElement>${jdk-toolsjar}</additionalClasspathElement>
                        </additionalClasspathElements>
                        <reportNameSuffix>${surefire.environment}-${surefire.executing-module}</reportNameSuffix>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${version.dependency.plugin}</version>
                    <executions>
                        <execution>
                            <!-- See http://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
                            <!-- This will only be effective if hibernate-search-sharedtestresources is actually a project dependency -->
                            <id>unpack-shared-test-build-resources</id>
                            <goals>
                                <goal>unpack-dependencies</goal>
                            </goals>
                            <phase>generate-test-resources</phase>
                            <configuration>
                                <outputDirectory>${project.build.directory}/</outputDirectory>
                                <includeGroupIds>${project.groupId}</includeGroupIds>
                                <includeArtifacIds>hibernate-search-sharedtestresources</includeArtifacIds>
                                <includeTypes>zip</includeTypes>
                                <excludeTransitive>true</excludeTransitive>
                            </configuration>
                        </execution>
                    </executions>
                </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>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>${version.forbiddenapis.plugin}</version>
                    <executions>
                        <execution>
                            <id>verify-forbidden-apis</id>
                            <configuration>
                                 <targetVersion>10</targetVersion>
                                 <!-- 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?) -->
                                     <exclude>**/*_$logger.class</exclude>
                                     <!-- JBoss message bundles format messages -->
                                     <exclude>**/*_$bundle.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-deprecated-1.8</bundledSignature>
                                     <bundledSignature>jdk-deprecated-9</bundledSignature>
                                     <bundledSignature>jdk-deprecated-10</bundledSignature>
                                     <bundledSignature>jdk-deprecated-11</bundledSignature>

                                     <bundledSignature>jdk-internal-1.8</bundledSignature>
                                     <bundledSignature>jdk-internal-9</bundledSignature>
                                     <bundledSignature>jdk-internal-10</bundledSignature>
                                     <bundledSignature>jdk-internal-11</bundledSignature>
                                 </bundledSignatures>
                                 <failOnMissingClasses>false</failOnMissingClasses>
                                 <failOnUnresolvableSignatures>false</failOnUnresolvableSignatures>
                                 <!--
                                 The method SharedSessionContract#getTransaction() should never be used
                                 as it is only reliable in certain configurations.
                                  -->
                                 <signaturesArtifacts>
                                     <signaturesArtifact>
                                         <groupId>org.hibernate</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>
                                 <targetVersion>${maven.compiler.argument.testTarget}</targetVersion>
                                 <!-- if the used Java version is too new, don't fail, just do nothing: -->
                                 <failOnUnsupportedJava>false</failOnUnsupportedJava>
                                 <failOnUnresolvableSignatures>false</failOnUnresolvableSignatures>
                                 <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</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</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>${puppycrawl.checkstyle.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>jcl-over-slf4j</artifactId>
                            <version>1.7.22</version>
                        </dependency>
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-jdk14</artifactId>
                            <version>1.7.22</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,
                            **/Log_$logger.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.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>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <version>${version.depends.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.alexcojocaru</groupId>
                    <artifactId>elasticsearch-maven-plugin</artifactId>
                    <version>${version.elasticsearch.plugin}</version>
                    <configuration>
                        <clusterName>hsearchEsTestCluster</clusterName>
                        <httpPort>9200</httpPort>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.bitstrings.maven.plugins</groupId>
                    <artifactId>dependencypath-maven-plugin</artifactId>
                    <version>${version.dependencypath.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>
                </plugin>
                <plugin>
                    <groupId>org.jboss.bridger</groupId>
                    <artifactId>bridger</artifactId>
                    <version>${version.org.jboss.bridger.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>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <version>${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>

        <!-- The profiles `skippingAllTests` and `skippingIntegrationTests` are currently duplicates,
            as one can't trigger the profile activation on either/or property -->
        <profile>
            <id>skippingAllTests</id>
            <activation>
                <property>
                    <name>skipTests</name>
                </property>
            </activation>
            <properties>
                <!-- This is to avoid starting an Elasticsearch node for each module needing integration test -->
                <test.elasticsearch.host.provided>true</test.elasticsearch.host.provided>
                <!-- And this to avoid unzipping any WildFly server, included modules, configurations and JDBC drivers -->
                <skipWildFlyPreparation>true</skipWildFlyPreparation>
            </properties>
        </profile>
        <profile>
            <id>skippingIntegrationTests</id>
            <activation>
                <property>
                    <name>skipITs</name>
                </property>
            </activation>
            <properties>
                <!-- This is to avoid starting an Elasticsearch node for each module needing integration test -->
                <test.elasticsearch.host.provided>true</test.elasticsearch.host.provided>
                <!-- And this to avoid unzipping any WildFly server, included modules, configurations and JDBC drivers -->
                <skipWildFlyPreparation>true</skipWildFlyPreparation>
            </properties>
        </profile>

        <profile>
            <id>dist</id>

            <properties>
                <failOnJavaDocError>true</failOnJavaDocError>
            </properties>

            <modules>
                <module>distribution</module>
            </modules>

            <build>
                <plugins>
                    <plugin>
                       <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                           <execution>
                                <id>generate-javadoc</id>
                                <goals>
                                    <goal>javadoc-no-fork</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <modules>
                <!-- Nothing at the moment -->
            </modules>
        </profile>

        <profile>
            <id>jdk9</id>
            <activation>
                <!-- Java 9 doesn't identify itself as "1.9" but "9" -->
                <jdk>9</jdk>
            </activation>
            <properties>
                <surefire.jvm.args.java-version.lenient>
                    -Djdk.attach.allowAttachSelf=true
                </surefire.jvm.args.java-version.lenient>
                <surefire.jvm.args.java-version.strict>
                    ${surefire.jvm.args.java-version.lenient}
                    --illegal-access=deny
                </surefire.jvm.args.java-version.strict>
                <arquillian.wildfly.jvm.args.java-version>
                    -Djdk.attach.allowAttachSelf=true
                </arquillian.wildfly.jvm.args.java-version>
                <pax-exam.jvm.args.java-version>
                    --add-modules=java.xml.bind
                </pax-exam.jvm.args.java-version>
            </properties>
            <modules>
                <module>integrationtest/jdk9-modules</module>
            </modules>
        </profile>

        <profile>
            <id>jdk10</id>
            <activation>
                <jdk>10</jdk>
            </activation>
            <properties>
                <surefire.jvm.args.java-version.lenient>
                    -Djdk.attach.allowAttachSelf=true
                </surefire.jvm.args.java-version.lenient>
                <surefire.jvm.args.java-version.strict>
                    ${surefire.jvm.args.java-version.lenient}
                    --illegal-access=deny
                </surefire.jvm.args.java-version.strict>
                <arquillian.wildfly.jvm.args.java-version>
                    -Djdk.attach.allowAttachSelf=true
                </arquillian.wildfly.jvm.args.java-version>
                <pax-exam.jvm.args.java-version>
                    --add-modules=java.xml.bind
                </pax-exam.jvm.args.java-version>
            </properties>
            <modules>
                <module>integrationtest/jdk9-modules</module>
            </modules>
        </profile>

        <profile>
            <id>jdk11+</id>
            <activation>
                <jdk>[11,)</jdk>
            </activation>
            <properties>
                <surefire.jvm.args.java-version.lenient>
                    -Djdk.attach.allowAttachSelf=true
                    -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true
                </surefire.jvm.args.java-version.lenient>
                <!--
                     When we use illegal-access=deny,
                     we have to open the java.lang package to EasyMock,
                     because cglib (used by EasyMock) requires to execute setAccessible(true)
                     on ClassLoader.defineClass(...).
                     See https://github.com/easymock/easymock/issues/235
                     See https://hibernate.atlassian.net/browse/HSEARCH-3419
                 -->
                <surefire.jvm.args.java-version.strict>
                    ${surefire.jvm.args.java-version.lenient}
                    --illegal-access=deny
                    --add-opens java.base/java.lang=ALL-UNNAMED
                </surefire.jvm.args.java-version.strict>
                <arquillian.wildfly.jvm.args.java-version>
                    -Djdk.attach.allowAttachSelf=true
                    --add-modules=java.se
                </arquillian.wildfly.jvm.args.java-version>
                <!-- Skip the OSGi integration tests with JDK 11+ -->
                <failsafe.osgi.skip>true</failsafe.osgi.skip>
            </properties>
            <modules>
                <module>integrationtest/jdk9-modules</module>
            </modules>
        </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>
            </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.apache.servicemix.tooling</groupId>
                                                <artifactId>depends-maven-plugin</artifactId>
                                                <versionRange>[1.2,)</versionRange>
                                                <goals>
                                                    <goal>generate-depends-file</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>[1.8,)</versionRange>
                                                <goals>
                                                    <goal>check</goal>
                                                    <goal>testCheck</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.wildfly.build</groupId>
                                                <artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
                                                <versionRange>[1.2.6.Final,)</versionRange>
                                                <goals>
                                                    <goal>build</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <!-- ====================================== -->
        <!-- Detection of tools classes for Byteman -->
        <!-- ====================================== -->
        <!-- See the configuration of the surefire and failsafe plugins -->
        <profile>
            <id>default-toolsjar-profile</id>
            <activation>
                <file>
                    <exists>${java.home}/../lib/tools.jar</exists>
                </file>
            </activation>
            <properties>
                <jdk-toolsjar>${java.home}/../lib/tools.jar</jdk-toolsjar>
            </properties>
        </profile>
        <profile>
            <id>mac-toolsjar-profile</id>
            <activation>
                <file>
                    <exists>${java.home}/../Classes/classes.jar</exists>
                </file>
            </activation>
            <properties>
                <jdk-toolsjar>${java.home}/../Classes/classes.jar</jdk-toolsjar>
            </properties>
        </profile>

        <!-- =============================== -->
        <!-- Elasticsearch IT profiles       -->
        <!-- =============================== -->
        <!--
             Different profiles are needed to handle the environment setup (which is handled in Maven,
             on contrary to the various database profiles).
             
             To run tests against a different version of Elasticsearch, use the appropriate profile
             and provide the Elasticsearch version:
             
                 mvn clean test -Pelasticsearch-2.0 -Dtest.elasticsearch.version=2.1.0
          -->
        
        <!-- Elasticsearch [2.0,2.2) test environment -->
        <profile>
            <id>elasticsearch-2.0</id>
            <properties>
                <version.elasticsearch.plugin>2.2</version.elasticsearch.plugin>
                <test.elasticsearch.host.version>2.0.0</test.elasticsearch.host.version>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>unpack-es-plugins</id>
                                    <phase>generate-test-resources</phase>
                                    <goals>
                                        <goal>unpack</goal>
                                    </goals>
                                    <configuration>
                                        <skip>${test.elasticsearch.host.provided}</skip>
                                        <artifactItems>
                                            <!-- Delete-by-query is a plugin in Elasticsearch 2.x -->
                                            <artifactItem>
                                                <groupId>org.elasticsearch.plugin</groupId>
                                                <artifactId>delete-by-query</artifactId>
                                                <version>${test.elasticsearch.host.version}</version>
                                                <type>zip</type>
                                                <overWrite>true</overWrite>
                                                <outputDirectory>${project.build.directory}/_ES_PLUGINS_/delete-by-query</outputDirectory>
                                            </artifactItem>
                                        </artifactItems>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>com.github.alexcojocaru</groupId>
                            <artifactId>elasticsearch-maven-plugin</artifactId>
                            <version>${version.elasticsearch.plugin}</version>
                            <configuration>
                                <skip>${test.elasticsearch.host.provided}</skip>
                                <tcpPort>9300</tcpPort>
                                <pluginsPath>${project.build.directory}/_ES_PLUGINS_</pluginsPath>
                                <outputDirectory>${project.build.directory}/elastisearch0</outputDirectory>
                                <configPath>${project.build.directory}/elasticsearch-maven-plugin/2.0/configuration/</configPath>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>org.elasticsearch</groupId>
                                    <artifactId>elasticsearch</artifactId>
                                    <version>${test.elasticsearch.host.version}</version>
                                </dependency>

                                <!-- Groovy is in a core module named "org.elasticsearch:elasticsearch-groovy" in Elasticsearch 2.0.x and 2.1.x
                                     Also, in ES 2.0/2.1, core modules are not located in the plugin directory as with newer versions, but are
                                     simply expected to be in the classpath.
                                -->
                                <dependency>
                                    <groupId>org.elasticsearch</groupId>
                                    <artifactId>elasticsearch-groovy</artifactId>
                                    <version>${test.elasticsearch.host.version}</version>
                                    <type>jar</type>
                                </dependency>
                            </dependencies>
                            <executions>
                                <execution >
                                    <id>start-elasticsearch</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>start</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>stop-elasticsearch</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>stop</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        
        <!-- Elasticsearch 2.2+ test environment -->
        <profile>
            <id>elasticsearch-2.2</id>
            <properties>
                <version.elasticsearch.plugin>2.2</version.elasticsearch.plugin>
                <test.elasticsearch.host.version>2.4.6</test.elasticsearch.host.version>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>unpack-es-plugins</id>
                                    <phase>generate-test-resources</phase>
                                    <goals>
                                        <goal>unpack</goal>
                                    </goals>
                                    <configuration>
                                        <skip>${test.elasticsearch.host.provided}</skip>
                                        <artifactItems>
                                            <!-- Delete-by-query is a plugin in Elasticsearch 2.x -->
                                            <artifactItem>
                                                <groupId>org.elasticsearch.plugin</groupId>
                                                <artifactId>delete-by-query</artifactId>
                                                <version>${test.elasticsearch.host.version}</version>
                                                <type>zip</type>
                                                <overWrite>true</overWrite>
                                                <outputDirectory>${project.build.directory}/_ES_PLUGINS_/delete-by-query</outputDirectory>
                                            </artifactItem>
                                            <!-- Groovy is in a plugin named "org.elasticsearch.module:lang-groovy" in Elasticsearch 2.2+ -->
                                            <artifactItem>
                                                <groupId>org.elasticsearch.module</groupId>
                                                <artifactId>lang-groovy</artifactId>
                                                <version>${test.elasticsearch.host.version}</version>
                                                <type>zip</type>
                                                <overWrite>true</overWrite>
                                                <outputDirectory>${project.build.directory}/_ES_PLUGINS_/lang-groovy</outputDirectory>
                                            </artifactItem>
                                        </artifactItems>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>com.github.alexcojocaru</groupId>
                            <artifactId>elasticsearch-maven-plugin</artifactId>
                            <version>${version.elasticsearch.plugin}</version>
                            <configuration>
                                <skip>${test.elasticsearch.host.provided}</skip>
                                <tcpPort>9300</tcpPort>
                                <pluginsPath>${project.build.directory}/_ES_PLUGINS_</pluginsPath>
                                <outputDirectory>${project.build.directory}/elastisearch0</outputDirectory>
                                <configPath>${project.build.directory}/elasticsearch-maven-plugin/2.0/configuration/</configPath>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>org.elasticsearch</groupId>
                                    <artifactId>elasticsearch</artifactId>
                                    <version>${test.elasticsearch.host.version}</version>
                                </dependency>
                            </dependencies>
                            <executions>
                                <execution >
                                    <id>start-elasticsearch</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>start</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>stop-elasticsearch</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>stop</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <!-- Elasticsearch 5.0/5.1 test environment -->
        <profile>
            <id>elasticsearch-5.0</id>
            <properties>
                <version.elasticsearch.plugin>6.14</version.elasticsearch.plugin>
                <test.elasticsearch.host.version>5.1.2</test.elasticsearch.host.version>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.github.alexcojocaru</groupId>
                            <artifactId>elasticsearch-maven-plugin</artifactId>
                            <version>${version.elasticsearch.plugin}</version>
                            <configuration>
                                <skip>${test.elasticsearch.host.provided}</skip>
                                <version>${test.elasticsearch.host.version}</version>
                                <timeout>90</timeout><!-- Make it work on our slow CI -->
                                <pathConf>${project.build.directory}/elasticsearch-maven-plugin/5.0/configuration/</pathConf>
                                <pathInitScript>${project.build.directory}/elasticsearch-maven-plugin/5.0/init/init.script</pathInitScript>
                                <autoCreateIndex>false</autoCreateIndex>
                                <environmentVariables>
                                    <JAVA_HOME>${test.elasticsearch.java_home}</JAVA_HOME>
                                </environmentVariables>
                            </configuration>
                            <!-- Different executions from 2.x: the "start" goal has been renamed in version 5  -->
                            <executions>
                                <execution >
                                    <id>start-elasticsearch</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>runforked</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>stop-elasticsearch</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>stop</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        
        <!-- Elasticsearch 5.2+ test environment (default) -->
        <profile>
            <id>elasticsearch-5.2</id>
            <activation>
                <!-- Activate by default, i.e. if test.elasticsearch.host.version has not been defined explicitly -->
                <property>
                    <name>!test.elasticsearch.host.version</name>
                </property>
            </activation>
            <properties>
                <version.elasticsearch.plugin>6.14</version.elasticsearch.plugin>
                <test.elasticsearch.host.version>5.6.8</test.elasticsearch.host.version>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.github.alexcojocaru</groupId>
                            <artifactId>elasticsearch-maven-plugin</artifactId>
                            <version>${version.elasticsearch.plugin}</version>
                            <configuration>
                                <skip>${test.elasticsearch.host.provided}</skip>
                                <version>${test.elasticsearch.host.version}</version>
                                <timeout>90</timeout><!-- Make it work on our slow CI -->
                                <pathConf>${project.build.directory}/elasticsearch-maven-plugin/5.0/configuration/</pathConf>
                                <pathInitScript>${project.build.directory}/elasticsearch-maven-plugin/5.0/init/init.script</pathInitScript>
                                <autoCreateIndex>false</autoCreateIndex>
                                <environmentVariables>
                                    <JAVA_HOME>${test.elasticsearch.java_home}</JAVA_HOME>
                                </environmentVariables>
                            </configuration>
                            <!-- Different executions from 2.x: the "start" goal has been renamed in version 5  -->
                            <executions>
                                <execution >
                                    <id>start-elasticsearch</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>runforked</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>stop-elasticsearch</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>stop</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </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>
                <!--
                    We don't use @{...} for late property evaluation here,
                    because these properties are evaluated by the maven-resource-plugin,
                    which doesn't understand the @{...} syntax but somehow manages to always use late evaluation.
                 -->
                <arquillian.wildfly.jvm.args.jacoco>${failsafe.jvm.args.jacoco.lateEval}</arquillian.wildfly.jvm.args.jacoco>
                <pax-exam.jvm.args.jacoco>${failsafe.jvm.args.jacoco.lateEval}</pax-exam.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>

        <!-- =============================== -->
        <!-- Database profiles               -->
        <!-- =============================== -->
        <!-- H2 is the default -->
        <profile>
            <id>h2</id>
            <activation>
                <property>
                    <name>inMemoryTests</name>
                    <value>!true</value>
                </property>
            </activation>
            <properties>
                <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
                <jdbc.driver.groupId>com.h2database</jdbc.driver.groupId>
                <jdbc.driver.artifactId>h2</jdbc.driver.artifactId>
                <jdbc.driver.version>${version.com.h2database}</jdbc.driver.version>
                <jdbc.driver>org.h2.Driver</jdbc.driver>
                <jdbc.url>jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1</jdbc.url>
                <jdbc.user>sa</jdbc.user>
                <jdbc.pass>sa</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!--
            ###################################################################
            Profiles naming db instances in the Red Hat QA/QE lab

            First, those with OSS drivers
            ###################################################################
        -->

        <!-- The MySQL 5.1 test environment -->
        <profile>
            <id>mysql51</id>
            <properties>
                <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
                <jdbc.driver.groupId>mysql</jdbc.driver.groupId>
                <jdbc.driver.artifactId>mysql-connector-java</jdbc.driver.artifactId>
                <!-- Version 6.0.5 fails with a ArrayIndexOutOfBoundsException during connection, so we'll stick to 5.x for now -->
                <jdbc.driver.version>5.1.13</jdbc.driver.version>
                <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
                <jdbc.url>jdbc:mysql://vmg02.mw.lab.eng.bos.redhat.com/searctru</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The PostgreSQL 8.4  test environment -->
        <profile>
            <id>postgresql84</id>
            <properties>
                <db.dialect>org.hibernate.dialect.PostgreSQL82Dialect</db.dialect>
                <jdbc.driver.groupId>org.postgresql</jdbc.driver.groupId>
                <jdbc.driver.artifactId>postgresql</jdbc.driver.artifactId>
                <jdbc.driver.version>42.1.1</jdbc.driver.version>
                <jdbc.driver>org.postgresql.Driver</jdbc.driver>
                <jdbc.url>jdbc:postgresql://notinstalled.lab.eng.bos.redhat.com:5432:searctru</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The PostgreSQL test environment on ci.hibernate.org (v. 9.3.9)-->
        <profile>
            <id>ci-postgresql</id>
            <properties>
                <db.dialect>org.hibernate.dialect.PostgreSQL92Dialect</db.dialect>
                <jdbc.driver.groupId>org.postgresql</jdbc.driver.groupId>
                <jdbc.driver.artifactId>postgresql</jdbc.driver.artifactId>
                <jdbc.driver.version>42.1.1</jdbc.driver.version>
                <jdbc.driver>org.postgresql.Driver</jdbc.driver>
                <jdbc.url>jdbc:postgresql://localhost:5432/testingdb</jdbc.url>
                <jdbc.user>hibernate_user</jdbc.user>
                <jdbc.pass>hibernate_password</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The MySQL test environment test environment on ci.hibernate.org (v. 10.0.19-MariaDB)-->
        <profile>
            <id>ci-mariadb</id>
            <properties>
                <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
                <jdbc.driver.groupId>org.mariadb.jdbc</jdbc.driver.groupId>
                <jdbc.driver.artifactId>mariadb-java-client</jdbc.driver.artifactId>
                <jdbc.driver.version>2.2.4</jdbc.driver.version>
                <jdbc.driver>org.mariadb.jdbc.Driver</jdbc.driver>
                <jdbc.url>jdbc:mariadb://localhost/testingdb</jdbc.url>
                <jdbc.user>hibernate_user</jdbc.user>
                <jdbc.pass>hibernate_password</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!--
            ###################################################################
            Then, those with commercial drivers
            ###################################################################
        -->
        <!--
             Those drivers are not available on public repos.
             In CI jobs, we use internal build tools to fetch the drivers
             and make the jars available to the build.
             Thus, the maven coordinates of the drivers below are fake.
             See https://svn.devel.redhat.com/repos/jboss-qa/hudson/config_repository/scripts/groovy.classes/hudson/util/JDBCLoader.groovy
        -->

        <!-- The DB2 9.7 test environment (using 9x drivers)-->
        <profile>
            <id>db2-97</id>
            <properties>
                <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>db2-97</jdbc.driver.artifactId>
                <jdbc.driver.version>4.11.77</jdbc.driver.version>
                <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
                <jdbc.url>jdbc:db2://vmg06.mw.lab.eng.bos.redhat.com:50000/jbossqa</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The Oracle11g test environment -->
        <profile>
            <id>oracle11gR1</id>
            <properties>
                <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>oracle</jdbc.driver.artifactId>
                <jdbc.driver.version>11.2.0.2.0</jdbc.driver.version>
                <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
                <jdbc.url>jdbc:oracle:thin:@dev04.qa.atl2.redhat.com:1521:qaora11</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <profile>
            <id>oracle11gR2</id>
            <properties>
                <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>oracle</jdbc.driver.artifactId>
                <jdbc.driver.version>11.2.0.2.0</jdbc.driver.version>
                <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
                <jdbc.url>jdbc:oracle:thin:@dev04.qa.atl2.redhat.com:1521:qaora11</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The Oracle11gRAC test environment -->
        <profile>
            <id>oracle11gR1RAC</id>
            <properties>
                <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>oracle</jdbc.driver.artifactId>
                <jdbc.driver.version>11.2.0.2.0</jdbc.driver.version>
                <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
                <jdbc.url>
                    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=vmg24-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=vmg25-vip.mw.lab.eng.bos.redhat.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))
                </jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>
        <profile>
            <id>oracle11gR2RAC</id>
            <properties>
                <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>oracle</jdbc.driver.artifactId>
                <jdbc.driver.version>11.2.0.2.0</jdbc.driver.version>
                <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
                <jdbc.url>
                    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=vmg24-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=vmg25-vip.mw.lab.eng.bos.redhat.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))
                </jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The Sybase ASE 15.5 test environment -->
        <profile>
            <id>sybase155</id>
            <properties>
                <db.dialect>org.hibernate.dialect.SybaseASE15Dialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>sybase</jdbc.driver.artifactId>
                <jdbc.driver.version>26502</jdbc.driver.version>
                <jdbc.driver>com.sybase.jdbc4.jdbc.SybDriver</jdbc.driver>
                <jdbc.url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/searctru</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>
        <profile>
            <id>sybase155-jtds</id>
            <properties>
                <db.dialect>org.hibernate.dialect.SybaseASE15Dialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>net.sourceforge.jtds</jdbc.driver.groupId>
                <jdbc.driver.artifactId>jtds</jdbc.driver.artifactId>
                <jdbc.driver.version>1.2.4</jdbc.driver.version>
                <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
                <jdbc.url>jdbc:jtds:sybase://vmg07.mw.lab.eng.bos.redhat.com:5000/searctru</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation />
            </properties>
        </profile>

        <!-- The SQLServer2008 R1 (MS JDBC) test environment -->
        <profile>
            <id>mssql2008R1</id>
            <properties>
                <db.dialect>org.hibernate.dialect.SQLServer2008Dialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>mssql</jdbc.driver.artifactId>
                <jdbc.driver.version>3.0.1301.101</jdbc.driver.version>
                <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
                <jdbc.url>jdbc:sqlserver://vmg04.mw.lab.eng.bos.redhat.com:1433</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation>4096</jdbc.isolation>
            </properties>
        </profile>

        <!-- The SQLServer2008 R2 (MS JDBC) test environment -->
        <profile>
            <id>mssql2008R2</id>
            <properties>
                <db.dialect>org.hibernate.dialect.SQLServer2008Dialect</db.dialect>
                <!-- These maven coordinates are fake (see above) -->
                <jdbc.driver.groupId>jdbcdrivers</jdbc.driver.groupId>
                <jdbc.driver.artifactId>mssql</jdbc.driver.artifactId>
                <jdbc.driver.version>3.0.1301.101</jdbc.driver.version>
                <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
                <jdbc.url>jdbc:sqlserver://vmg04.mw.lab.eng.bos.redhat.com:1433</jdbc.url>
                <jdbc.user>searctru</jdbc.user>
                <jdbc.pass>searctru</jdbc.pass>
                <jdbc.isolation>4096</jdbc.isolation>
            </properties>
        </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>
    </profiles>
</project>
