<?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>ru.vzotov</groupId>
    <artifactId>d3fx-parent</artifactId>
    <version>1.1</version>
    <packaging>pom</packaging>

    <name>d3fx :: parent</name>
    <description>Parent POM for d3fx submodules</description>
    <url>https://github.com/vitalyzotov/d3fx</url>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <java.version>17</java.version>
        <javafx.version>17.0.1</javafx.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Internal -->
            <dependency>
                <groupId>ru.vzotov</groupId>
                <artifactId>d3fx-quadtree</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>ru.vzotov</groupId>
                <artifactId>d3fx-sankey-chart</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>ru.vzotov</groupId>
                <artifactId>d3fx-force</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>ru.vzotov</groupId>
                <artifactId>d3fx-selection</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>ru.vzotov</groupId>
                <artifactId>d3fx-sankey</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>ru.vzotov</groupId>
                <artifactId>d3fx-shape</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- JavaFX -->
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-base</artifactId>
                <version>${javafx.version}</version>
            </dependency>

            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-controls</artifactId>
                <version>${javafx.version}</version>
            </dependency>

            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-graphics</artifactId>
                <version>${javafx.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.12.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>vitalyzotov</id>
            <email>vitalyzotov@gmail.com</email>
            <url>https://github.com/vitalyzotov</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/vitalyzotov/d3fx</url>
        <connection>scm:git:git://github.com/vitalyzotov/d3fx.git</connection>
        <developerConnection>scm:git:git@github.com:vitalyzotov/d3fx.git</developerConnection>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>vzotov-snapshots</id>
            <url>https://maven.vzotov.ru/repository/maven-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>vzotov-snapshots</id>
            <url>https://maven.vzotov.ru/repository/maven-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <profiles>
        <profile>
            <id>sign</id>
            <activation>
                <property>
                    <name>sign</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release-central</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.3.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>ossrh</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>