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

    <parent>
        <groupId>org.kuhlins.maven</groupId>
        <artifactId>tk-maven-base</artifactId>
        <version>0.6</version>
    </parent>

    <groupId>net.limbomedia</groupId>
    <artifactId>limboesp</artifactId>
    <version>0.5-SNAPSHOT</version>
    
    <properties>
        <version.spring.boot>3.5.16</version.spring.boot>
        <version.tk-lib>0.10-SNAPSHOT</version.tk-lib>
    </properties>
    
    <scm>
        <connection>scm:git:git://github.com/thomaskuh/limboesp.git</connection>
        <developerConnection>scm:git:git@github.com:thomaskuh/limboesp.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://github.com/thomaskuh/limboesp</url>
    </scm>
    
    <distributionManagement>
        <repository>
            <id>repo.kuhlins.org</id>
            <url>https://repo.kuhlins.org/maven2</url>
        </repository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>${version.spring.boot}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.kuhlins.lib</groupId>
            <artifactId>tk-lib-utils</artifactId>
            <version>${version.tk-lib}</version>
        </dependency>
        <dependency>
            <groupId>org.kuhlins.lib</groupId>
            <artifactId>tk-lib-webkit</artifactId>
			<version>${version.tk-lib}</version>
        </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-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-log4j2</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.200</version>
            <!-- Without version, spring would bring next incompatible major 2.x. -->
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>27.1-jre</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.8.0</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>repo.kuhlins.org</id>
            <url>https://repo.kuhlins.org/maven2</url>
        </repository>
    </repositories>

    <build>
        <finalName>limboesp</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean verify docker:build</preparationGoals>
                    <goals>clean deploy docker:build docker:push</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${version.spring.boot}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <configuration>
                    <verbose>true</verbose>
                    <images>
                        <image>
                            <alias>buildit</alias>
                            <name>limbomedia/limboesp</name>
                            <build>
                                <noCache>true</noCache>
                                <tags>
                                    <tag>${project.version}</tag>
                                    <tag>latest</tag>
                                    <tag>${dkr.tag}</tag>
                                </tags>
                                <!-- Default directory but must be specified to use a dockerfile -->
                                <contextDir>${project.basedir}/src/main/docker</contextDir>
                                <assembly>
                                    <descriptorRef>artifact</descriptorRef>
                                </assembly>
                            </build>
                        </image>
                    </images>
                </configuration>
            </plugin>
        </plugins>

    </build>

</project>
