<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.gravitee</groupId>
    <artifactId>gravitee-parent</artifactId>
    <version>2</version>
    <packaging>pom</packaging>

    <name>Gravitee.IO Parent POM</name>

    <description>The Gravitee.IO Parent POM provides common settings for all Gravitee components.</description>
    <url>https://github.com/gravitee-io</url>
    <inceptionYear>2015</inceptionYear>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/gravitee-io/</url>
    </issueManagement>

    <scm>
        <url>https://github.com/gravitee-io/parent</url>
        <connection>scm:git:git://github.com/gravitee-io/parent.git</connection>
        <developerConnection>scm:git:git@github.com:gravitee-io/parent.git</developerConnection>
    </scm>

    <ciManagement>
        <system>Jenkins</system>
        <url>http://build.gravitee.io/jenkins/</url>
    </ciManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <organization>
        <name>Gravitee.IO</name>
        <url>http://gravitee.io</url>
    </organization>

    <developers>
        <developer>
            <email>azize.elamrani@gmail.com</email>
            <name>Azize ELAMRANI</name>
            <url>https://github.com/aelamrani</url>
            <id>aelamrani</id>
        </developer>
        <developer>
            <email>brasseld@gmail.com</email>
            <name>David BRASSELY</name>
            <url>https://github.com/brasseld</url>
            <id>brasseld</id>
        </developer>
        <developer>
            <email>loic.dassonville@gmail.com</email>
            <name>Loïc DASSONVILLE</name>
            <url>https://github.com/ldassonville</url>
            <id>ldassonville</id>
        </developer>
        <developer>
            <email>nicolas.geraud@gmail.com</email>
            <name>Nicolas GERAUD</name>
            <url>https://github.com/NicolasGeraud</url>
            <id>NicolasGeraud</id>
        </developer>
        <developer>
            <email>aurelien.bourdon@gmail.com</email>
            <name>Aurélien BOURDON</name>
            <url>https://github.com/abourdon</url>
            <id>abourdon</id>
        </developer>
        <developer>
            <email>titouan.compiegne@gmail.com</email>
            <name>Titouan COMPIEGNE</name>
            <url>https://github.com/tcompiegne</url>
            <id>tcompiegne</id>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j.version>1.7.12</slf4j.version>
        <spring.version>4.1.6.RELEASE</spring.version>
        <junit.version>4.12</junit.version>
        <logback.version>1.1.3</logback.version>
        <mockito.version>1.10.19</mockito.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <includes>
                        <!-- Default inclusions -->
                        <include>**/Test*.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*TestCase.java</include>

                        <!-- Test suite inclusion -->
                        <include>**/*Suite.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
                    <properties>
                        <owner>The Gravitee team</owner>
                        <email>http://gravitee.io</email>
                    </properties>
                    <excludes>
                        <exclude>LICENSE.txt</exclude>
                        <exclude>**/README</exclude>
                        <exclude>src/main/packaging/**</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>node_modules/**</exclude>
                        <exclude>dist/**</exclude>
                        <exclude>.tmp/**</exclude>
                        <exclude>bower_components/**</exclude>
                        <exclude>.*</exclude>
                        <exclude>.*/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>gravitee-release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.6</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-nexus-staging</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </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.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.8</version>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>gravitee-report</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.4.201502262128</version>
                        <configuration>
                            <append>true</append>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>post-unit-test</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
