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

    <groupId>com.kagurabi</groupId>
    <artifactId>kagura</artifactId>
    <version>1.8</version>
    <packaging>pom</packaging>

    <name>Kagura</name>
    <description>The base POM of the Kagura project</description>
    <url>https://kagura.atlassian.net/</url>

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

    <properties>
        <maven-resources-plugin.version>2.4.2</maven-resources-plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.6</java.version>
        <slf4j.version>1.7.5</slf4j.version>
        <log4j.version>1.2.17</log4j.version>
        <junit.version>4.8.2</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <commons-lang3.version>3.1</commons-lang3.version>
        <commons-collections.version>3.2.1</commons-collections.version>
        <commons-io.version>2.4</commons-io.version>
        <guava.version>14.0.1</guava.version>
        <commons-beanutils.version>1.8.3</commons-beanutils.version>
        <groovy.version>2.1.2</groovy.version>
        <maven-bundle-plugin.version>2.3.7</maven-bundle-plugin.version>
    </properties>

      <developers>
	      <developer>
		      <id>Arran</id>
		      <name>Arran Ubels</name>
		      <email>arran@kagurabi.com</email>
		      <url>http://www.base2services.com/about/team.html</url>
		      <organization>base2Services</organization>
		      <organizationUrl>http://www.base2services.com/</organizationUrl>
		      <roles>
			      <role>developer</role>
		      </roles>
		      <timezone>+10</timezone>
	      </developer>
      </developers>

    <scm>
        <connection>scm:git:git@github.com:base2Services/kagura.git</connection>
        <developerConnection>scm:git:git@github.com:base2Services/kagura.git</developerConnection>
        <url>git@github.com:base2Services/kagura.git</url>
    </scm>

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

    <modules>
        <module>shared</module>
        <module>services</module>
        <module>example</module>
        <module>war-rest</module>
    </modules>

    <build>
        <plugins>
            <!-- Ensures we are compiling at 1.6 level -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <!-- Ensures that the minimum version of maven is 3.1.0 or greater -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.1.0,)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Generate source jar files -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- Jenkins by default defines a property BUILD_NUMBER which is used to enable the profile. -->
        <profile>
            <id>jenkins</id>
            <activation>
                <property>
                    <name>env.BUILD_NUMBER</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>2.5.2</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <!-- PGP singing profile for releases -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
