<?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>de.deadlocker8</groupId>
    <artifactId>BudgetMaster</artifactId>
    <version>2.0.0</version>
    <name>BudgetMaster</name>

    <repositories>
        <repository>
            <id>release</id>
            <url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-release</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>snapshots</id>
            <url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.13.RELEASE</version>
        <relativePath/>
    </parent>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>de.thecodelabs</groupId>
                <artifactId>jlibs</artifactId>
                <version>${jlibs.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

        <jlibs.version>2.0.4</jlibs.version>
        <versionizer.version>1.0.2</versionizer.version>

        <app.versionDate>${maven.build.timestamp}</app.versionDate>
        <maven.build.timestamp.format>dd.MM.yy</maven.build.timestamp.format>
        <app.versionCode>14</app.versionCode>
        <app.author>Robert Goldmann</app.author>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jadira.usertype</groupId>
            <artifactId>usertype.core</artifactId>
            <version>5.0.0.GA</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>de.thecodelabs</groupId>
            <artifactId>libUtils</artifactId>
        </dependency>

        <dependency>
            <groupId>de.thecodelabs</groupId>
            <artifactId>libStorage</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <outputDirectory>build/${project.version}</outputDirectory>
                    <finalName>${project.artifactId}-v${project.version}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.akathist.maven.plugins.launch4j</groupId>
                <artifactId>launch4j-maven-plugin</artifactId>
                <version>1.7.21</version>
                <executions>
                    <execution>
                        <id>l4j-clui</id>
                        <phase>package</phase>
                        <goals>
                            <goal>launch4j</goal>
                        </goals>
                        <configuration>
                            <headerType>gui</headerType>
                            <jar>build/${project.version}/${project.artifactId}-v${project.version}.jar</jar>
                            <outfile>build/${project.version}/${project.artifactId}-v${project.version}.exe</outfile>
                            <downloadUrl>http://java.com/download</downloadUrl>
                            <classPath>
                                <mainClass>${project.groupId}${project.artifactId}.Main</mainClass>
                            </classPath>
                            <jre>
                                <bundledJre64Bit>false</bundledJre64Bit>
                                <bundledJreAsFallback>false</bundledJreAsFallback>
                                <minVersion>1.8.0</minVersion>
                                <jdkPreference>preferJre</jdkPreference>
                                <runtimeBits>64/32</runtimeBits>
                            </jre>
                            <icon>build/icon.ico</icon>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
                <configuration>
                    <junitArtifactName>junit:junit</junitArtifactName>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>