<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~   Copyright (c) 2024 Dario Lucia (https://www.dariolucia.eu)
  ~
  ~   Licensed under the Apache License, Version 2.0 (the "License");
  ~   you may not use this file except in compliance with the License.
  ~   You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~   Unless required by applicable law or agreed to in writing, software
  ~   distributed under the License is distributed on an "AS IS" BASIS,
  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~   See the License for the specific language governing permissions and
  ~   limitations under the License.
  -->
<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>eu.dariolucia.jfx</groupId>
    <artifactId>eu.dariolucia.jfx.timeline</artifactId>
    <version>0.7.0</version>
    <packaging>jar</packaging>

    <name>JavaFX Timeline Chart</name>
    <description>Timeline/Gantt chart widget for JavaFX applications.</description>
    <url>https://www.github.com/dariol83/timeline</url>

    <developers>
        <developer>
            <name>Dario Lucia</name>
            <email>dario.lucia@gmail.com</email>
            <url>https://www.dariolucia.eu</url>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/dariol83/timeline.git</url>
        <connection>scm:git:git@github.com:dariol83/timeline.git</connection>
        <developerConnection>scm:git:git@github.com:dariol83/timeline.git</developerConnection>
    </scm>

    <properties>
        <!-- Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- Java version -->
        <java.version>11</java.version>
        <!-- External libraries versions -->
        <openjfx.version>19.0.2.1</openjfx.version>
        <!-- Maven plugin versions -->
        <maven.jacoco.version>0.8.8</maven.jacoco.version>
        <maven.jar.version>2.4</maven.jar.version>
        <maven.javadoc.version>3.6.3</maven.javadoc.version>
        <maven.source.version>3.1.0</maven.source.version>
        <maven.compiler.version>3.11.0</maven.compiler.version>
        <maven.version>2.5</maven.version>
        <maven.gpg.version>1.6</maven.gpg.version>
        <maven.sonatype.version>0.4.0</maven.sonatype.version>
        <maven.bundle.version>5.1.8</maven.bundle.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>

    <build>
        <plugins>
            <!-- Maven version to use -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>${maven.version}</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>
            <!-- Set the source file version to Java 11-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <release>${java.version}</release>
                </configuration>
            </plugin>
            <!-- Source JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourcepath>src/main/java</sourcepath>
                    <show>package</show>
                    <nohelp>true</nohelp>
                </configuration>
            </plugin>
            <!-- Bundle plugin -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${maven.bundle.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>eu.dariolucia.jfx.timeline,eu.dariolucia.jfx.timeline.model</Export-Package>
                        <Private-Package>eu.dariolucia.jfx.timeline.internal</Private-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-base</artifactId>
            <version>${openjfx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${openjfx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>${openjfx.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${maven.sonatype.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>