<?xml version="1.0" encoding="UTF-8"?>
<!--
 *
 * Copyright 2017 Eonian Technologies.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 -->
<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.eoniantech.build</groupId>
    <artifactId>logback-bom</artifactId>
    <version>1.3.0-alpha4</version>
    <packaging>pom</packaging>
    <name>Eonian Logback BOM</name>
    <description>Bill of materials for Logback.</description>
    <url>https://github.com/eonian-technologies/logback-bom</url>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${project.version}</version>
            </dependency>  
        </dependencies>
    </dependencyManagement>

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

    <scm>
        <url>https://github.com/eonian-technologies/logback-bom</url>
        <connection>scm:git:https://github.com/eonian-technologies/logback-bom.git</connection>
        <developerConnection>scm:git:git@github.com:eonian-technologies/logback-bom.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <id>Michael.Andrews</id>
            <name>Michael Andrews</name>
            <organization>Eonian Technologies</organization>
            <url>https://github.com/eonian-technologies</url>
            <roles>
                <role>owner</role>
                <role>developer</role>
            </roles>
            <email>Michael.Andrews@eoniantech.com</email>
            <timezone>-5</timezone>
        </developer>
    </developers>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Nexus plugin for deploying to the Sonatype repo. -->
                <!-- Automatically bound to the deploy goal. -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>    
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- Sign the artifacts with GnuPG -->
        <profile>
            <id>sign</id> 
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>1.6</version>
                            <executions>
                                <execution>
                                    <id>sign-artifacts</id>
                                    <phase>verify</phase>
                                    <goals>
                                        <goal>sign</goal>
                                    </goals> 
                                    <configuration>
                                        <gpgArguments>
                                            <arg>--pinentry-mode</arg>
                                            <arg>loopback</arg>
                                        </gpgArguments> 
                                        <passphraseServerId>${gpg.keyName}</passphraseServerId>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin> 
                </plugins> 
            </build>
        </profile>
    </profiles>
</project>