<?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>

    <parent>
        <groupId>com.composum.meta.ist</groupId>
        <artifactId>parent-2</artifactId>
        <version>1.5.2</version>
    </parent>

    <artifactId>parent-2-public</artifactId>
    <packaging>pom</packaging>

    <name>IST parent POM for public projects</name>
    <description>Parent-POM for public projects of the IST Gmbh Dresden</description>

    <properties>
        <release.repository.id>ossrh</release.repository.id>
        <release.repository.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repository.url>
        <release.autoReleaseAfterClose>false</release.autoReleaseAfterClose>
        <release.keyname>info@composum.com</release.keyname>
    </properties>

    <profiles>

        <profile>
            <!-- profile to release the artifacts for the public repository -->
            <id>nexus-staging</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>${release.repository.id}</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <!--
                                As we switch to releasing via Github, we do not want the stuff to be immediately released, since
                                we want things to be as resilient as possible: the git push of the release commits
                                happens only after things are successfully uploaded to sonatype and the release happens only after the git push.
                                A release can then be triggered by mvn nexus-staging:release in target/checkout , or in the Nexus UI.
                            -->
                            <autoReleaseAfterClose>${release.autoReleaseAfterClose}</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${release.keyname}</keyname>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>

    </profiles>
</project>
