<?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>com.dlsc</groupId>
        <artifactId>dlsc-maven-parent</artifactId>
        <version>1.2.0</version>
    </parent>

    <name>UnitFXParent</name>
    <groupId>com.dlsc.unitfx</groupId>
    <artifactId>unitfx-parent</artifactId>
    <version>1.0.10</version>
    <packaging>pom</packaging>

    <modules>
        <module>unitfx</module>
        <module>unitfx-demo</module>
    </modules>

    <properties>
        <project.identifier>unitfx</project.identifier>
        <project.github.repository>dlsc-software-consulting-gmbh/UnitFX</project.github.repository>
        <local.repository.path>/tmp/repository</local.repository.path>
        <sonar.projectKey>dlsc-software-consulting-gmbh_UnitFX</sonar.projectKey>
        <java.version>11</java.version>
        <javafx.version>18</javafx.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.dlsc.unitfx</groupId>
                <artifactId>unitfx</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.measure</groupId>
                <artifactId>unit-api</artifactId>
                <version>2.1.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jreleaser</groupId>
                        <artifactId>jreleaser-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <configuration>
                            <jreleaser>
                                <release>
                                    <github>
                                        <branch>master</branch>
                                        <tagName>{{projectVersion}}</tagName>
                                        <overwrite>true</overwrite>
                                        <changelog>
                                            <formatted>ALWAYS</formatted>
                                            <format>- {{commitShortHash}} {{commitTitle}}</format>
                                            <contributors>
                                                <format>- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}</format>
                                            </contributors>
                                            <hide>
                                                <contributors>GitHub</contributors>
                                            </hide>
                                        </changelog>
                                    </github>
                                </release>
                            </jreleaser>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
