<?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>com.nerdvision</groupId>
    <artifactId>nerdvision-pom</artifactId>
    <version>2.0.1</version>

    <packaging>pom</packaging>

    <name>nerd.vision Project Object Model</name>

    <description>This is the common POM for nerd.vision projects.</description>

    <url>http://nerd.vision</url>

    <licenses>
        <license>
            <name>nerd.vision Agent License</name>
            <url>https://nerd.vision/legal/agent-license</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Intergral GmbH</name>
        <url>https://intergral.com</url>
    </organization>

    <scm>
        <url>https://gitlab.com/intergral</url>
    </scm>

    <issueManagement>
        <system>jira</system>
        <url>https://intergral.atlassian.net/</url>
    </issueManagement>

    <properties>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <developers>
        <developer>
            <name>Nerd Vision</name>
            <id>nerdvision</id>
            <organization>Intergral Information Solutions GmbH</organization>
            <email>support@nerd.vision</email>
            <timezone>+1</timezone>
            <organizationUrl>http://www.intergral.com</organizationUrl>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>release-ossrh</id>
            <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>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.sonatype.plugins</groupId>
                            <artifactId>nexus-staging-maven-plugin</artifactId>
                            <version>1.6.8</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-source-plugin</artifactId>
                            <version>3.1.0</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>3.1.0</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>1.6</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources--9</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                                <configuration>
                                    <excludes>
                                        <exclude>**/**</exclude>
                                    </excludes>
                                    <forceCreation>true</forceCreation>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <executable>gpg</executable>
                                    <passphrase>${env.GPG_PASSPHRASE}</passphrase>
                                    <gpgArguments>
                                        <argument>--no-tty</argument>
                                        <argument>--batch</argument>
                                    </gpgArguments>
                                    <useAgent>false</useAgent>
                                    <!--https://stackoverflow.com/questions/28859942/how-do-i-get-the-maven-gpg-plugin-to-use-a-passphrase-from-environment-variable-->
                                    <!--                                    <gpgArguments>-->
                                    <!--                                        <argument>&#45;&#45;pinentry-mode</argument>-->
                                    <!--                                        <argument>loopback</argument>-->
                                    <!--                                    </gpgArguments>-->
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
