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

    <!-- mvn javadoc:aggregate-jar (javadoc em jar) -->
    <!-- mvn source:jar (os fontes em jar)          -->

    <groupId>com.github.kyriosdata.saep</groupId>
    <artifactId>saep-dominio</artifactId>
    <packaging>jar</packaging>
    <version>1.0.3</version>

    <name>com.github.kyriosdata.saep:saep-dominio</name>
    <description>Modelo de Domínio do Sistema de Apoio à Elaboração
    de Pareceres (SAEP), composto por um único 'bounded context'.</description>
    <url>https://github.com/kyriosdata/saep</url>

    <licenses>
        <license>
            <name>Creative Commons Attribution 4.0 International (CC BY 4.0)</name>
            <comments>A atribuição deve conter, explicitamente, a seguinte linha:
                Copyright (c) 2016. Fábrica de Software - Instituto de Informática (UFG)
            </comments>
            <url>https://creativecommons.org/licenses/by/4.0/</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>kyriosdata</id>
            <name>Fábio Nogueira de Lucena</name>
            <email>fabio@inf.ufg.br</email>
            <organization>Instituto de Informática (UFG)</organization>
            <organizationUrl>http://www.inf.ufg.br</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/kyriosdata/saep.git</connection>
        <developerConnection>scm:git:https://github.com/kyriosdata/saep.git</developerConnection>
        <url>https://github.com/kyriosdata/saep</url>
    </scm>

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

    <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.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>

        <dependency>
            <groupId>com.udojava</groupId>
            <artifactId>EvalEx</artifactId>
            <version>1.3</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>cobertura</id>
            <build>

                <plugins>

                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.7.201606060606</version>
                        <executions>
                            <execution>
                                <id>default-prepare-agent</id>
                                <goals><goal>prepare-agent</goal></goals>
                            </execution>
                            <execution>
                                <id>default-report</id>
                                <phase>prepare-package</phase>
                                <goals><goal>report</goal></goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                        <version>4.2.0</version>
                    </plugin>

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

        <!-- PROFILE: release -->
        <profile>
            <id>release</id>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>package-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>package-javadoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <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>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                        <executions>
                            <execution>
                                <id>deploy-to-sonatype</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                    <goal>release</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

        </profile>
    </profiles>

</project>
