<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2015  Savoir Technologies, Inc
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses />.
  -->
<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">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.savoirtech</groupId>
    <artifactId>savoir-parent</artifactId>
    <name>Savoir Parent POM</name>
    <packaging>pom</packaging>
    <version>1.0.3</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>

        <!--
        Maven Plugin Versions
        -->
        <build.helper.plugin.version>1.9.1</build.helper.plugin.version>
        <bundle.plugin.version>2.5.4</bundle.plugin.version>
        <deploy.plugin.version>2.8.2</deploy.plugin.version>
        <failsafe.plugin.version>2.18.1</failsafe.plugin.version>
        <jacoco.plugin.version>0.7.4.201502262128</jacoco.plugin.version>
        <jar.plugin.version>2.6</jar.plugin.version>
        <resources.plugin.version>2.7</resources.plugin.version>
        <source.plugin.version>2.4</source.plugin.version>
        <surefire.plugin.version>2.18.1</surefire.plugin.version>
        <war.plugin.version>2.6</war.plugin.version>

        <!--
        OSGi Manifest Properties
        -->
        <osgi.export>{local-packages};-split-package:=error</osgi.export>
        <osgi.import>*</osgi.import>
        <osgi.private>{local-packages}</osgi.private>
        <osgi.embed />
        <osgi.embed.dir>lib</osgi.embed.dir>
        <osgi.activator />
        <osgi.dynamic />
    </properties>

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

    <organization>
        <name>Savoir Technologies, Inc.</name>
        <url>http://www.savoirtech.com</url>
    </organization>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build.helper.plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${resources.plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${deploy.plugin.version}</version>
                    <configuration>
                        <retryFailedDeploymentCount>3</retryFailedDeploymentCount>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${source.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>default-prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-prepare-agent-integration</id>
                            <goals>
                                <goal>prepare-agent-integration</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report-integration</id>
                            <goals>
                                <goal>report-integration</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${failsafe.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>verify</id>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${jar.plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${war.plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${bundle.plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <niceManifest>true</niceManifest>
                        <instructions>
                            <Import-Package>${osgi.import}</Import-Package>
                            <Export-Package>${osgi.export}</Export-Package>
                            <Private-Package>${osgi.private}</Private-Package>
                            <Embed-Dependency>${osgi.embed}</Embed-Dependency>
                            <Embed-Directory>${osgi.embed.dir}</Embed-Directory>
                            <DynamicImport-Package>${osgi.dynamic}</DynamicImport-Package>
                            <Bundle-Activator>${osgi.activator}</Bundle-Activator>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                            <Specification-Title>${project.name}</Specification-Title>
                            <Specification-Version>${project.version}</Specification-Version>
                            <Specification-Vendor>${project.organization.name}</Specification-Vendor>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
                            <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>bundle-manifest</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>
</project>
