<!--
  ~ 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-tomcat-sessionmanager</artifactId>
    <packaging>pom</packaging>
    <version>2.2</version>
    <name>Hazelcast Tomcat Session Manager</name>
    <description>Tomcat Session Manager Module for Hazelcast</description>
    <url>http://www.hazelcast.com/</url>

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

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

        <hazelcast.version>4.0.2</hazelcast.version>

        <servlet.api.version>3.0.1</servlet.api.version>
        <junit.version>4.11</junit.version>
        <log4j.version>1.2.12</log4j.version>

        <!-- Not using 3.1 at the moment since it recompiles all classes every time -->
        <!-- https://jira.codehaus.org/browse/MCOMPILER-205 -->
        <!--<maven.compiler.plugin.version>3.1</maven.compiler.plugin.version>-->
        <maven.compiler.plugin.version>2.5.1</maven.compiler.plugin.version>
        <maven.javadoc.plugin.version>2.9</maven.javadoc.plugin.version>
        <maven.gpg.plugin.version>1.4</maven.gpg.plugin.version>

        <maven.surefire.plugin.version>2.19.1</maven.surefire.plugin.version>
        <maven.checkstyle.plugin.version>2.15</maven.checkstyle.plugin.version>
        <maven.findbugs.plugin.version>3.0.5</maven.findbugs.plugin.version>
        <maven.sonar.plugin.version>3.3.0.603</maven.sonar.plugin.version>
        <maven.jacoco.plugin.version>0.7.9</maven.jacoco.plugin.version>
        <bytebuddy.version>1.6.12</bytebuddy.version>
        
        <sonar.jacoco.jar>${basedir}/lib/jacocoagent.jar</sonar.jacoco.jar>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.language>java</sonar.language>
        <sonar.verbose>true</sonar.verbose>
        <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
        <kryo.version>5.0.0-RC4</kryo.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-tomcat-sessionmanager.git</connection>
        <developerConnection>scm:git:git@github.com:hazelcast/hazelcast-tomcat-sessionmanager.git</developerConnection>
        <url>https://github.com/hazelcast/hazelcast-tomcat-sessionmanager/</url>
    </scm>
    <developers>
        <developer>
            <id>mesutcelik</id>
            <name>Mesut Celik</name>
            <email>mesut@hazelcast.com</email>
        </developer>
    </developers>

    <organization>
        <name>Hazelcast, Inc.</name>
        <url>http://www.hazelcast.com/</url>
    </organization>

    <modules>
        <module>tomcat-core</module>
        <module>tomcat7</module>
        <module>tomcat8</module>
        <module>tomcat85</module>
        <module>tomcat9</module>
    </modules>

    <repositories>
        <repository>
            <id>backup-repository</id>
            <name>Maven Central (Backup)</name>
            <url>https://repo.maven.apache.org/maven2/</url>
        </repository>
        <repository>
            <id>snapshot-repository</id>
            <name>Maven2 Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>release-repository</id>
            <name>release repository</name>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
        </repository>
    </repositories>

    <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-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <argLine>
                        -Xms1g -Xmx1g -XX:MaxPermSize=1024M
                        -Dhazelcast.hidensity.check.freememory=false
                        -Dhazelcast.phone.home.enabled=false
                        -Dhazelcast.mancenter.enabled=false
                        -Dhazelcast.tomcat.shutdown_hazelcast_instance=false
                        -Dhazelcast.graceful.shutdown.max.wait=10
                        ${extraVmArgs}
                    </argLine>
                    <excludedGroups>com.hazelcast.test.annotation.NightlyTest,com.hazelcast.test.annotation.SlowTest
                    </excludedGroups>
                </configuration>
            </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>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${servlet.api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>${hazelcast.version}</version>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>${hazelcast.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>${bytebuddy.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>${bytebuddy.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>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>
                            <javaApiLinks>
                                <property>
                                    <name>api_1.6</name>
                                    <value>http://download.oracle.com/javase/1.6.0/docs/api/</value>
                                </property>
                                <property>
                                    <name>api_1.7</name>
                                    <value>http://download.oracle.com/javase/1.7.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.3</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>release-repository</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
                        </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>
                            <javaApiLinks>
                                <property>
                                    <name>api_1.6</name>
                                    <value>http://download.oracle.com/javase/1.6.0/docs/api/</value>
                                </property>
                                <property>
                                    <name>api_1.7</name>
                                    <value>http://download.oracle.com/javase/1.7.0/docs/api/</value>
                                </property>
                            </javaApiLinks>
                            <excludePackageNames>
                            </excludePackageNames>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>test-coverage</id>
            <properties>
                <argLine>
                    ${extraVmArgs}
                    -Xms1g -Xmx1g -XX:MaxPermSize=1024M
                    -Dhazelcast.hidensity.check.freememory=false
                    -Dhazelcast.phone.home.enabled=false
                    -Dhazelcast.mancenter.enabled=false
                    -Dhazelcast.logging.type=none
                    -Dhazelcast.test.use.network=false
                    -Dhazelcast.graceful.shutdown.max.wait=10
                </argLine>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.sonarsource.java</groupId>
                    <artifactId>sonar-jacoco-listeners</artifactId>
                    <version>3.10</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <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">
                            <!-- disable parallel execution so that JaCoCo listener can properly work -->
                            <parallel>none</parallel>
                            <perCoreThreadCount>false</perCoreThreadCount>
                            <forkCount>1</forkCount>
                            <properties>
                                <property>
                                    <name>listener</name>
                                    <value>org.sonar.java.jacoco.JUnitListener</value>
                                </property>
                            </properties>
                            <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>master</id>
            <properties>
                <hazelcast.version>4.2-SNAPSHOT</hazelcast.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.hazelcast</groupId>
                    <artifactId>hazelcast</artifactId>
                    <version>${hazelcast.version}</version>
                    <type>test-jar</type>
                </dependency>
            </dependencies>
            <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
                                -Dhazelcast.graceful.shutdown.max.wait=10
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <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>
</project>