<?xml version="1.0" encoding="UTF-8"?>
<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>pl.fhframework</groupId>
    <artifactId>fh-boot-bom</artifactId>
    <version>4.9.20</version>
    <packaging>pom</packaging>

    <name>fh-boot</name>
    <description>Boot dependencies information set</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
    </parent>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <cxf.version>3.1.6</cxf.version>
        <version.infinispan.starter>2.0.0.Final</version.infinispan.starter>
        <version.roaster>2.20.0.Final</version.roaster>

        <fh.version>${project.version}</fh.version>
        <fh.version.display>${fh.version}</fh.version.display>
        <springboot.version>2.4.2</springboot.version>
        <hibernate.version>5.4.1.Final</hibernate.version>
        <aspectj.version>1.9.4</aspectj.version>
        <bom.dir>${user.dir}/bom-project-lite</bom.dir>
        <config.dir.name>config</config.dir.name>
        <config.dir>${project.build.sourceDirectory}/../resources/${config.dir.name}/</config.dir>
    </properties>

    <profiles>
        <profile>
            <id>springboot</id>
            <activation>
                <property>
                    <name>!skip-springboot</name>
                </property>
            </activation>
            <properties>
                <packaging.type>jar</packaging.type>
                <application.properties.file>
                    springboot-application.properties
                </application.properties.file>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>pl.fhframework</groupId>
                        <artifactId>fh-springboot-bom</artifactId>
                        <version>4.9.20</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-starter-bootstrap</artifactId>
                    <version>3.0.1</version>
                </dependency>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-core</artifactId>
                    <version>${hibernate.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-entitymanager</artifactId>
                    <version>${hibernate.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-actuator</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-aop</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-data-jpa</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-thymeleaf</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-jta-atomikos</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter</artifactId>
                    <exclusions>
                        <exclusion>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-logging</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-web</artifactId>
                    <exclusions>
                        <exclusion>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-logging</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-websocket</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-security</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-test</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>fh-standalone</id>
            <activation>
                <property>
                    <name>!skip-fh-standalone</name>
                </property>
            </activation>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>pl.fhframework</groupId>
                        <artifactId>fh-springboot-bom</artifactId>
                        <version>4.9.20</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>pl.fhframework</groupId>
                    <artifactId>fhJpa-standalone</artifactId>
                </dependency>
                <dependency>
                    <groupId>pl.fhframework</groupId>
                    <artifactId>cache-standalone</artifactId>
                </dependency>
                <dependency>
                    <groupId>pl.fhframework</groupId>
                    <artifactId>pubsub-standalone</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>fh-tomcat</id>
            <activation>
                <property>
                    <name>!skip-fh-tomcat</name>
                </property>
            </activation>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>pl.fhframework</groupId>
                        <artifactId>fh-springboot-bom</artifactId>
                        <version>4.9.20</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>pl.fhframework</groupId>
                    <artifactId>fhTomcat-config</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>fh-h2</id>
            <activation>
                <property>
                    <name>!skip-fh-h2</name>
                </property>
            </activation>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>pl.fhframework</groupId>
                        <artifactId>fh-springboot-bom</artifactId>
                        <version>4.9.20</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                    <version>1.4.196</version>
                </dependency>
                <dependency>
                    <groupId>org.orbisgis</groupId>
                    <artifactId>h2gis-functions</artifactId>
                    <version>1.3.2</version>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>jboss-eap6.4</id>
            <properties>
                <packaging.type>war</packaging.type>
                <application.properties.file>
                    jboss-eap6.4-application.properties
                </application.properties.file>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>pl.fhframework</groupId>
                        <artifactId>fh-jboss-eap6.4-bom</artifactId>
                        <version>4.9.20</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>pl.fhframework</groupId>
                    <artifactId>fhJpa-jee</artifactId>
                    <version>${fh.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.springframework.security</groupId>
                    <artifactId>spring-security-config</artifactId>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.8</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <echoproperties/>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>3.1.0</version>
                        <configuration>
                            <webXml>
                                ${config.dir}/jboss-eap6.4-web.xml
                            </webXml>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jboss-eap7.2</id>
            <properties>
                <packaging.type>war</packaging.type>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>pl.fhframework</groupId>
                        <artifactId>fh-jboss-eap7.2-bom</artifactId>
                        <version>4.1.4</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>pl.fhframework</groupId>
                    <artifactId>fhJpa-jee</artifactId>
                    <version>${fh.version}</version>
                </dependency>
                <dependency>
                    <groupId>javax</groupId>
                    <artifactId>javaee-api</artifactId>
                    <version>7.0</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-core</artifactId>
                    <version>5.3.7.Final-redhat-00001</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.infinispan</groupId>
                    <artifactId>infinispan-core</artifactId>
                    <version>${infinispan.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.infinispan</groupId>
                    <artifactId>infinispan-commons</artifactId>
                    <version>${infinispan.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.8</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <echoproperties/>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>3.1.0</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <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.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <repositories>
        <repository>
            <id>osgeo</id>
            <name>OSGeo Release Repository</name>
            <url>https://repo.osgeo.org/repository/release/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.12</version>
                <executions>
                    <execution>
                        <id>timestamp-property</id>
                        <goals>
                            <goal>timestamp-property</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <name>defaultRevision</name>
                            <pattern>yyMMddHHmm</pattern>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                            <goal>create-timestamp</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <timestampPropertyName>buildTimestamp</timestampPropertyName>
                    <timestampFormat>{0,date,yyyy-MM-dd HH:mm:ss}</timestampFormat>
                    <revisionOnScmFailure>${fh.version.display}.${defaultRevision}</revisionOnScmFailure>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <scm>
        <connection>scm:git:https://github.com/assecopl/fh</connection>
        <developerConnection>scm:git:https://github.com/assecopl/fh</developerConnection>
        <tag>develop</tag>
        <url>https://github.com/assecopl/fh</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>
