<?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.fraunhofer.iosb.ilt</groupId>
    <artifactId>ConfigurableParent</artifactId>
    <version>0.37</version>
    <packaging>pom</packaging>

    <name>ConfigurableParent</name>
    <description>A light-weight framework for generating configuration user interfaces from classes and storing the configuration in JSON.</description>
    <url>https://github.com/FraunhoferIOSB/Configurable</url>
    <inceptionYear>2014</inceptionYear>

    <organization>
        <name>Fraunhofer IOSB</name>
        <url>http://iosb.fraunhofer.de</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Lesser General Public License v3, or (at your option) any later version</name>
            <url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
            <comments>For more information see the LICENSE file included with the sources.</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Hylke van der Schaaf</name>
            <email>hylke.vanderschaaf@iosb.fraunhofer.de</email>
            <organization>Fraunhofer IOSB</organization>
            <organizationUrl>https://www.iosb.fraunhofer.de</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>Configurable</module>
        <module>examples/AnnotationExample</module>
        <module>examples/ConfigurableExample</module>
    </modules>

    <scm>
        <connection>scm:git:git@github.com:FraunhoferIOSB/Configurable.git</connection>
        <developerConnection>scm:git:git@github.com:FraunhoferIOSB/Configurable.git</developerConnection>
        <tag>v0.37</tag>
        <url>https://github.com/FraunhoferIOSB/Configurable</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/FraunhoferIOSB/Configurable/issues</url>
    </issueManagement>

    <properties>
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <root.basedir>${project.basedir}</root.basedir>

        <version.commons-lang>3.17.0</version.commons-lang>
        <version.gson>2.13.1</version.gson>
        <version.logback>1.5.18</version.logback>

        <version.maven.plugin.assembly>3.7.1</version.maven.plugin.assembly>
        <version.maven.plugin.central-publishing>0.7.0</version.maven.plugin.central-publishing>
        <version.maven.plugin.compiler>3.14.0</version.maven.plugin.compiler>
        <version.maven.plugin.gpg>3.2.7</version.maven.plugin.gpg>
        <version.maven.plugin.javadoc>3.11.2</version.maven.plugin.javadoc>
        <version.maven.plugin.release>3.1.1</version.maven.plugin.release>
        <version.maven.plugin.source>3.3.1</version.maven.plugin.source>
        <version.maven.plugin.spotless>2.44.4</version.maven.plugin.spotless>

        <version.openjfx>22.0.2</version.openjfx>
        <version.reflections>0.10.2</version.reflections>
        <version.slf4j-api>2.0.17</version.slf4j-api>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${version.logback}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${version.gson}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${version.commons-lang}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-controls</artifactId>
                <version>${version.openjfx}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-fxml</artifactId>
                <version>${version.openjfx}</version>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${version.reflections}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j-api}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${version.maven.plugin.assembly}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven.plugin.compiler}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>${version.maven.plugin.spotless}</version>
                <configuration>
                    <formats>
                        <format>
                            <includes>
                                <include>scripts/codestyle/*.xml</include>
                            </includes>
                            <eclipseWtp>
                                <type>XML</type>
                                <files>
                                    <file>${root.basedir}/scripts/codestyle/xml.prefs</file>
                                </files>
                            </eclipseWtp>
                        </format>
                        <format>
                            <includes>
                                <include>.gitignore</include>
                            </includes>
                            <trimTrailingWhitespace/>
                            <endWithNewline/>
                        </format>
                    </formats>
                    <pom>
                        <includes>
                            <include>**/pom.xml</include>
                        </includes>
                        <sortPom>
                            <keepBlankLines>true</keepBlankLines>
                            <nrOfIndentSpace>4</nrOfIndentSpace>
                            <sortDependencies>groupId,artifactId</sortDependencies>
                            <sortProperties>true</sortProperties>
                            <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
                            <expandEmptyElements>false</expandEmptyElements>
                        </sortPom>
                    </pom>
                    <java>
                        <eclipse>
                            <version>4.21</version>
                            <file>${root.basedir}/scripts/codestyle/formatter.xml</file>
                        </eclipse>
                        <importOrder/>
                        <removeUnusedImports/>
                        <licenseHeader>
                            <file>${root.basedir}/scripts/license-header</file>
                        </licenseHeader>
                    </java>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.maven.plugin.source}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.maven.plugin.javadoc}</version>
                        <configuration>
                            <source>8</source>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${version.maven.plugin.release}</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.maven.plugin.gpg}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${version.maven.plugin.central-publishing}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
