<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
        <relativePath/>
    </parent>
    <groupId>com.garethahealy</groupId>
    <artifactId>projects-pom</artifactId>
    <packaging>pom</packaging>
    <version>1.0.6</version>
    <name>${project.artifactId}</name>
    <description>https://github.com/garethahealy</description>

    <organization>
        <name>Gareth Healy</name>
        <url>https://github.com/garethahealy</url>
    </organization>

    <developers>
        <developer>
            <id>garethahealy</id>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/garethahealy/poms/tree/master</connection>
        <developerConnection>scm:git:https://github.com/garethahealy/poms/tree/master</developerConnection>
        <url>https://github.com/garethahealy/poms/tree/master</url>
    </scm>

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

    <prerequisites>
        <maven>${maven-version}</maven>
    </prerequisites>

    <modules>
        <module>building-tools</module>
        <module>plugins-parent</module>
        <module>commons-parent</module>
        <module>osgi-plugins-parent</module>
        <module>osgi-parent</module>
        <module>camel-parent</module>
        <module>eap-parent</module>
        <module>brms-parent</module>
        <module>springboot-parent</module>
    </modules>

    <properties>
        <maven-version>3.2.3</maven-version>

        <!-- Project settings -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java-runtime>1.7</java-runtime>

        <!-- license -->
        <license.licenseName>apache_v2</license.licenseName>
        <license.inceptionYear>2013</license.inceptionYear>
        <license.addJavaLicenseAfterPackage>false</license.addJavaLicenseAfterPackage>

        <maven-javadoc-plugin-version>2.10.1</maven-javadoc-plugin-version>
        <maven-gpg-plugin-version>1.6</maven-gpg-plugin-version>
        <nexus-staging-maven-plugin-version>1.6.3</nexus-staging-maven-plugin-version>
        <versions-maven-plugin-version>2.1</versions-maven-plugin-version>
    </properties>

    <!-- Build plugins -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-javadoc-plugin/ -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin-version}</version>
                </plugin>
                <plugin>
                    <!-- http://maven.apache.org/plugins/maven-gpg-plugin -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin-version}</version>
                </plugin>
                <plugin>
                    <!-- http://central.sonatype.org/pages/apache-maven.html -->
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus-staging-maven-plugin-version}</version>
                </plugin>
                <plugin>
                    <!-- http://mojo.codehaus.org/versions-maven-plugin -->
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin-version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release-ossrh</id>
            <build>
                <plugins>
                    <!-- General plugins which make the JARs -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Governance plugins -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <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>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <uniqueVersion>false</uniqueVersion>
            <id>snapshots</id>
            <name>libs-snapshot</name>
            <url>file:${user.home}/.m2/repository</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>repository.redhat.com</id>
            <name>RedHat TechPreview Repository</name>
            <url>http://maven.repository.redhat.com/techpreview/all/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>fusesource.jboss.com</id>
            <name>Fuse Jboss Repository</name>
            <url>https://repository.jboss.org/nexus/content/groups/fs-public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repository.redhat.com</id>
            <name>RedHat TechPreview Repository</name>
            <url>http://maven.repository.redhat.com/techpreview/all/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>fusesource.jboss.com</id>
            <name>Fuse Jboss Repository</name>
            <url>https://repository.jboss.org/nexus/content/groups/fs-public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

</project>
