<?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>ca.weblite</groupId>
    <artifactId>jdeploy-desktop-lib</artifactId>
    <version>1.0.4</version>
    <packaging>pom</packaging>
    <name>jdeploy-desktop-lib</name>

    <description>Desktop application library for jDeploy applications.</description>
    <url>https://github.com/shannah/jdeploy-desktop-lib</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
    </properties>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/shannah/jdeploy-desktop-lib.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:shannah/jdeploy-desktop-lib.git</developerConnection>
        <url>https://github.com/shannah/jdeploy-desktop-lib</url>
    </scm>

    <developers>
        <developer>
            <id>shannah</id>
            <name>Steve Hannah</name>
            <email>steve@weblite.ca</email>
        </developer>
    </developers>

    <modules>
        <module>jdeploy-desktop-lib-bom</module>
        <module>jdeploy-desktop-lib-core</module>
        <module>jdeploy-desktop-lib-swing</module>
        <module>jdeploy-desktop-lib-javafx</module>
        <module>jdeploy-desktop-lib-hive</module>
        <module>jdeploy-desktop-lib-hive-filewatcher</module>
        <module>jdeploy-desktop-lib-bridge</module>
    </modules>

    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </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>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <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>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <doclint>none</doclint>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
