<?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>
    <name>${component.name}</name>
    <groupId>io.github.eckig</groupId>
    <artifactId>grapheditor</artifactId>
    <version>21.1.2</version>
    <packaging>pom</packaging>
    <inceptionYear>2014</inceptionYear>

    <description>A library for creating and editing graph-like diagrams in JavaFX</description>
    <url>https://github.com/eckig/graph-editor</url>

    <licenses>
        <license>
            <name>Eclipse Public License - v 1.0</name>
            <url>https://www.eclipse.org/legal/epl-v10.html</url>
        </license>
    </licenses>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <name>Robert Fisher</name>
            <email>rfisher@tesis.de</email>
            <organization>TESIS Dynaware GmbH</organization>
            <organizationUrl>http://www.tesis-dynaware.com</organizationUrl>
        </developer>
        <developer>
            <name>Steffen Rachner</name>
            <email>steffen.rachner@t-systems.com</email>
            <organization>T-Systems Information Services GmbH</organization>
            <organizationUrl>http://www.t-systems-ifs.com/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:eckig/graph-editor.git</connection>
        <developerConnection>scm:git:git@github.com:eckig/graph-editor.git</developerConnection>
        <url>git@github.com:eckig/graph-editor.git</url>
    </scm>

    <properties>
        <component.name>Graph Editor</component.name>
        <maven.build.timestamp.format>yyyymmddhhmm</maven.build.timestamp.format>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.jar.plugin.version>3.2.0</maven.jar.plugin.version>
        <maven.dependency.plugin.version>3.1.2</maven.dependency.plugin.version>
        <org.eclipse.emf.ecore.version>2.42.0</org.eclipse.emf.ecore.version>
        <org.eclipse.emf.common.version>2.45.0</org.eclipse.emf.common.version>
        <org.eclipse.emf.ecore.xmi.version>2.40.0</org.eclipse.emf.ecore.xmi.version>
        <org.eclipse.emf.edit.version>2.23.0</org.eclipse.emf.edit.version>
        <junit.version>4.13.2</junit.version>
        <org.slf4j.version>2.0.17</org.slf4j.version>
        <org.openjfx.version>25.0.2</org.openjfx.version>
        <openjfx-monocle.version>21.0.2</openjfx-monocle.version>
    </properties>

    <modules>
        <module>api</module>
        <module>core</module>
        <module>model</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.15.0</version>
                    <configuration>
                        <release>21</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.5</version>
                    <configuration>
                        <argLine>--add-opens=javafx.base/com.sun.javafx.logging=ALL-UNNAMED</argLine>
                        <argLine>--add-opens=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED</argLine>
                        <argLine>--add-opens=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argLine>
                        <argLine>--add-opens=javafx.graphics/com.sun.javafx.util=ALL-UNNAMED</argLine>
                        <argLine>-Dprism.order=sw</argLine>
                        <argLine>-Dglass.platform=Monocle</argLine>
                        <argLine>-Dmonocle.platform=Headless</argLine>
                        <argLine>-Djava.awt.headless=true</argLine>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jreleaser</groupId>
                    <artifactId>jreleaser-maven-plugin</artifactId>
                    <version>1.23.0</version>
                    <inherited>false</inherited>
                    <configuration>
                        <jreleaser>
                            <signing>
                                <pgp>
                                    <active>ALWAYS</active>
                                    <armored>true</armored>
                                </pgp>
                            </signing>
                            <deploy>
                                <maven>
                                    <maven-central>
                                        <sonatype>
                                            <active>RELEASE</active>
                                            <url>https://central.sonatype.com/api/v1/publisher</url>
                                            <stagingRepositories>target/staging-deploy</stagingRepositories>
                                        </sonatype>
                                    </maven-central>
                                </maven>
                            </deploy>
                        </jreleaser>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>publication</id>
            <properties>
                <skipTests>true</skipTests>
                <altDeploymentRepository>local::file:./target/staging-deploy</altDeploymentRepository>
                <altReleaseDeploymentRepository>local::file:./target/staging-deploy</altReleaseDeploymentRepository>
                <altSnapshotDeploymentRepository>local::file:./target/staging-deploy</altSnapshotDeploymentRepository>
            </properties>
            <build>
               <plugins>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-javadoc-plugin</artifactId>
                       <version>3.12.0</version>
                       <executions>
                           <execution>
                               <id>attach-javadocs</id>
                               <goals>
                                   <goal>jar</goal>
                               </goals>
                           </execution>
                       </executions>
                       <configuration>
                           <doclint>none</doclint>
                           <quiet>true</quiet>
                       </configuration>
                   </plugin>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-source-plugin</artifactId>
                       <version>3.4.0</version>
                       <executions>
                           <execution>
                               <id>attach-sources</id>
                               <goals>
                                   <goal>jar</goal>
                               </goals>
                           </execution>
                       </executions>
                   </plugin>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-deploy-plugin</artifactId>
                       <version>3.1.4</version>
                       <configuration>
                       </configuration>
                   </plugin>
               </plugins>
            </build>
        </profile>
    </profiles>
</project>
