<!--
  ~ Copyright 2020 Hazelcast Inc.
  ~
  ~ Licensed under the Hazelcast Community License (the "License"); you may not use
  ~ this file except in compliance with the License. You may obtain a copy of the
  ~ License at
  ~
  ~ http://hazelcast.com/hazelcast-community-license
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  ~ WARRANTIES OF ANY KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations under the License.
  --><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>

    <name>hazelcast-hibernate5</name>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-hibernate5-parent</artifactId>
    <version>2.2.1</version>
    <packaging>pom</packaging>
    <description>Hazelcast IMDG Hibernate Plugin</description>
    <url>http://www.hazelcast.com/</url>

    <modules>
        <module>hazelcast-hibernate5</module>
        <module>hazelcast-hibernate52</module>
        <module>hazelcast-hibernate53</module>
    </modules>

    <properties>
        <main.basedir>${project.basedir}</main.basedir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <jdk.version>1.8</jdk.version>
        <target.dir>target</target.dir>
        <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
        <timestamp>${maven.build.timestamp}</timestamp>

        <hazelcast.version>4.2.1</hazelcast.version>

        <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
        <maven.jar.plugin.version>3.2.0</maven.jar.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.resources.plugin.version>3.1.0</maven.resources.plugin.version>
        <build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
        <maven.javadoc.plugin.version>3.3.0</maven.javadoc.plugin.version>
        <maven.antrun.plugin.version>1.7</maven.antrun.plugin.version>
        <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
        <maven.assembly.plugin.version>2.4</maven.assembly.plugin.version>
        <maven.rar.plugin.version>2.2</maven.rar.plugin.version>
        <maven.bundle.plugin.version>2.3.7</maven.bundle.plugin.version>
        <maven.shade.plugin.version>2.2</maven.shade.plugin.version>
        <maven.dependency.plugin.version>2.6</maven.dependency.plugin.version>
        <maven.animal.sniffer.plugin.version>1.18</maven.animal.sniffer.plugin.version>
        <maven.git.commit.id.plugin.version>2.1.10</maven.git.commit.id.plugin.version>
        <maven.gpg.plugin.version>1.4</maven.gpg.plugin.version>
        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
        <maven.failsafe.plugin.version>2.14</maven.failsafe.plugin.version>
        <maven.findbugs.plugin.version>3.0.5</maven.findbugs.plugin.version>
        <maven.checkstyle.plugin.version>3.1.2</maven.checkstyle.plugin.version>
        <maven.sonar.plugin.version>3.3.0.603</maven.sonar.plugin.version>
        <maven.jacoco.plugin.version>0.8.7</maven.jacoco.plugin.version>
        <maven.cobertura.plugin.version>2.0</maven.cobertura.plugin.version>

        <log4j.version>1.2.17</log4j.version>
        <slf4j.api.version>1.7.32</slf4j.api.version>

        <junit.version>4.13.2</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <mockito.version>1.10.19</mockito.version>
        <powermock.version>2.0.9</powermock.version>
        <wiremock.version>2.27.2</wiremock.version>

        <findbugs.version>1.3.2</findbugs.version>

        <sonar.jacoco.jar>${basedir}/lib/jacocoagent.jar</sonar.jacoco.jar>
        <!--<sonar.phase>post-integration-test</sonar.phase>-->
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.language>java</sonar.language>
        <sonar.verbose>true</sonar.verbose>

        <hsqldb.version>2.5.1</hsqldb.version>
        <javassist.version>3.27.0-GA</javassist.version>
        <hibernate.core.version>5.0.12.Final</hibernate.core.version>
        <bytebuddy.version>1.10.11</bytebuddy.version>
    </properties>

    <licenses>
        <license>
            <name>The Hazelcast Community License</name>
            <url>http://hazelcast.com/hazelcast-community-license</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git://github.com/hazelcast/hazelcast-hibernate5.git</connection>
        <developerConnection>scm:git:git@github.com:hazelcast/hazelcast-hibernate5.git</developerConnection>
        <url>https://github.com/hazelcast/hazelcast-hibernate5/</url>
    </scm>
    <developers>
        <developer>
            <id>oztalip</id>
            <name>talip ozturk</name>
            <email>talip@hazelcast.com</email>
        </developer>
        <developer>
            <id>fuad</id>
            <name>fuad malikov</name>
            <email>fuad@hazelcast.com</email>
        </developer>
        <developer>
            <id>bturner</id>
            <name>bryan turner</name>
            <email>bturner@atlassian.com</email>
        </developer>
    </developers>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>

                        <configuration>
                            <createSourcesJar>true</createSourcesJar>
                            <shadeSourcesContent>true</shadeSourcesContent>
                            <artifactSet>
                                <includes>
                                    <include>com.github.ben-manes.caffeine:caffeine</include>
                                </includes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>com.github.ben-manes.caffeine:caffeine</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.idx</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <relocations>
                                <relocation>
                                    <pattern>com.github.benmanes</pattern>
                                    <shadedPattern>com.hazelcast.hibernate.shaded</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>

                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>5.1.2</version>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                        <configuration>
                            <instructions>
                                <Export-Package>
                                    com.hazelcast.*
                                </Export-Package>
                                <Import-Package>
                                    !org.junit,
                                    !com.hazelcast.*,
                                    org.apache.log4j;resolution:=optional,
                                    org.apache.log4j.*;resolution:=optional,
                                    org.apache.logging.log4j;resolution:=optional,
                                    org.apache.logging.log4j.*;resolution:=optional,
                                    org.slf4j;resolution:=optional,
                                    *
                                </Import-Package>
                                <Fragment-Host>com.hazelcast</Fragment-Host>
                                <!--<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>-->
                            </instructions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <configuration>
                    <archive>
                        <index>true</index>
                        <compress>true</compress>
                        <manifest>
                            <addClasspath>false</addClasspath>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration combine.self="override">
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <runOrder>failedfirst</runOrder>
                    <argLine>
                        -Xms128m -Xmx1G -XX:MaxPermSize=128M
                        -Dhazelcast.phone.home.enabled=false
                        -Dhazelcast.mancenter.enabled=false
                        -Dhazelcast.logging.type=none
                        -Dhazelcast.test.use.network=false
                    </argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>snapshot-repository</id>
            <name>Maven2 Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>release-repository</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>snapshot-repository</id>
            <name>Maven2 Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>4.1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <scope>test</scope>
            <version>${hazelcast.version}</version>
            <classifier>tests</classifier>
        </dependency>
        <dependency>
            <groupId>javax.cache</groupId>
            <artifactId>cache-tests</artifactId>
            <classifier>tests</classifier>
            <version>1.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>${hsqldb.version}</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.api.version}</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.api.version}</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate.core.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-api</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>${wiremock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>${powermock.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>checkstyle</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>${maven.checkstyle.plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>checkstyle</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <configLocation>${main.basedir}/checkstyle/checkstyle.xml</configLocation>
                            <suppressionsLocation>${main.basedir}/checkstyle/suppressions.xml</suppressionsLocation>
                            <headerLocation>${main.basedir}/checkstyle/ClassHeader.txt</headerLocation>
                            <enableRSS>false</enableRSS>
                            <linkXRef>true</linkXRef>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <failOnViolation>true</failOnViolation>
                            <includeTestSourceDirectory>false</includeTestSourceDirectory>
                            <enableRulesSummary>true</enableRulesSummary>
                            <propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>findbugs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <version>${maven.findbugs.plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>compile</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <failOnError>true</failOnError>
                            <excludeFilterFile>${main.basedir}/findbugs/findbugs-exclude.xml</excludeFilterFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>test-coverage</id>
            <properties>
                <argLine>
                    -Xms128m -Xmx1G -XX:MaxPermSize=128M
                    -Dhazelcast.version.check.enabled=false
                    -Dhazelcast.mancenter.enabled=false
                    -Dhazelcast.logging.type=none
                    -Dhazelcast.test.use.network=false
                </argLine>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${maven.jacoco.plugin.version}</version>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven.surefire.plugin.version}</version>
                        <configuration combine.self="override">
                            <redirectTestOutputToFile>true</redirectTestOutputToFile>
                            <testFailureIgnore>true</testFailureIgnore>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${maven.sonar.plugin.version}</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <properties>
                <javadoc>true</javadoc>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadoc.plugin.version}</version>
                        <configuration>
                            <doclint>none</doclint>
                            <javaApiLinks>
                                <property>
                                    <name>api_1.8</name>
                                    <value>http://download.oracle.com/javase/1.8.0/docs/api/</value>
                                </property>
                            </javaApiLinks>
                            <maxmemory>1024</maxmemory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>release-repository</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-snapshot</id>
            <properties>
                <javadoc>true</javadoc>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadoc.plugin.version}</version>
                        <configuration>
                            <doclint>none</doclint>
                            <javaApiLinks>
                                <property>
                                    <name>api_1.8</name>
                                    <value>http://download.oracle.com/javase/1.8.0/docs/api/</value>
                                </property>
                            </javaApiLinks>
                            <excludePackageNames>
                                *.impl:*.internal:*.operations:*.proxy:*.util:com.hazelcast.aws.security:
                                *.handlermigration:*.client.connection.nio:*.client.console:*.buildutils:
                                *.client.protocol.generator:*.cluster.client:*.concurrent:*.collection:
                                *.nio.ascii:*.nio.ssl:*.nio.tcp:*.partition.client:*.transaction.client:
                                *.core.server:com.hazelcast.instance:com.hazelcast.PlaceHolder
                            </excludePackageNames>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>master</id>
            <properties>
                <hazelcast.version>5.0-SNAPSHOT</hazelcast.version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven.surefire.plugin.version}</version>
                        <configuration combine.self="override">
                            <parallel>none</parallel>
                            <redirectTestOutputToFile>true</redirectTestOutputToFile>
                            <argLine>-Xms128m -Xmx1G -XX:MaxPermSize=128M
                                -Dhazelcast.phone.home.enabled=false
                                -Dhazelcast.mancenter.enabled=false
                                -Dhazelcast.logging.type=none
                                -Dhazelcast.test.use.network=true
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>