<?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>berlin.yuna</groupId>
        <artifactId>maven-parent</artifactId>
        <version>0.0.3</version>
    </parent>

    <groupId>berlin.yuna</groupId>
    <artifactId>maven-oss-parent</artifactId>
    <version>0.2.0</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>Maven oss parent pom helps open source projects to deploy and release Maven repositories to maven central (https://central.sonatype.org)</description>
    <url>${git-parent-project.url}</url>

    <developers>
        <developer>
            <name>Yuna Morgenstern</name>
            <email>io@yuna.berlin</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <java.version>1.8</java.version>
        <parent-project.encoding>UTF-8</parent-project.encoding>
        <project.build.sourceEncoding>${parent-project.encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${parent-project.encoding}</project.reporting.outputEncoding>
        <git-parent-project.url>https://github.com/YunaBraska/maven-oss-parent</git-parent-project.url>
    </properties>

    <!-- MAVEN CENTRAL USAGE -->
    <profiles>
        <profile>
            <!-- mvn clean deploy -P release -->
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                    <value>true</value>
                </property>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <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>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-plugin</artifactId>
                        <configuration>
                            <pushChanges>true</pushChanges>
                            <tag>${project.version}</tag>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                    </plugin>
                </plugins>
            </build>

            <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>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>berlin.yuna</id>
            <name>berlin.yuna</name>
            <url>https://artifactory.yuna.berlin:443/libs-release-local</url>
        </repository>
    </repositories>

    <scm>
        <connection>scm:git:${git-parent-project.url}</connection>
        <developerConnection>scm:git:${git-parent-project.url}</developerConnection>
        <url>${git-parent-project.url}.git</url>
    </scm>
</project>