<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>SmartTime</artifactId>
    <version>6.0.0</version>

    <properties>
        <jlibs.version>2.0.6</jlibs.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <outputDirectory>build/${project.version}</outputDirectory>
                    <finalName>SmartTime-v${project.version}</finalName>
                    <appendAssemblyId>false</appendAssemblyId>
                    <archive>
                        <manifest>
                            <mainClass>de.deadlocker8.smarttime.main.Main</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- LAUNCH4J -->
            <plugin>
                <groupId>com.akathist.maven.plugins.launch4j</groupId>
                <artifactId>launch4j-maven-plugin</artifactId>
                <version>2.1.0</version>
                <executions>
                    <execution>
                        <id>l4j-clui</id>
                        <phase>package</phase>
                        <goals>
                            <goal>launch4j</goal>
                        </goals>
                        <configuration>
                            <headerType>gui</headerType>
                            <jar>build/${project.version}/SmartTime-v${project.version}.jar</jar>
                            <outfile>build/${project.version}/SmartTime-v${project.version}.exe</outfile>
                            <downloadUrl>http://java.com/download</downloadUrl>
                            <classPath>
                                <mainClass>de.deadlocker8.smarttime.main.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>
        </plugins>
    </build>

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

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

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.6</version>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.34.0</version>
        </dependency>
    </dependencies>

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