<?xml version="1.0" encoding="UTF-8"?>

<!-- 
 Copyright (C) 2013 The Cat Hive Developers.
 
 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>com.cathive</groupId>
    <artifactId>oss-parent</artifactId>
    <packaging>pom</packaging>
    <version>2</version>
    <name>Cat Hive OSS Parent POM</name>
    <description>Common definition for all the Cat Hive projects</description>
    <url>https://github.com/cathive/${project.artifactId}/</url>
    <inceptionYear>2013</inceptionYear>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <properties>
        <!-- Global Maven build configuration -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
        <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
        <maven.compiler.target>1.7</maven.compiler.target>
        <maven.compiler.useIncrementalCompilation>true</maven.compiler.useIncrementalCompilation>
        <!-- Netbeans platform hints -->
        <netbeans.hint.jdkPlatform>JDK_1.7</netbeans.hint.jdkPlatform>
        <!-- Jetty configuration -->
        <jetty.scanIntervalSeconds>5</jetty.scanIntervalSeconds>
        <!-- Version definitions -->
        <bridj.version>0.6.2</bridj.version>
        <guava.version>14.0.1</guava.version>
        <guice.version>3.0</guice.version>
        <jdo-api.version>3.0.1</jdo-api.version>
        <jetty.version>9.0.0.v20130308</jetty.version>
        <jinput.version>2.0.5</jinput.version>
        <jogl.version>2.0-rc11</jogl.version>
        <testng.version>6.8</testng.version>
    </properties>

    <prerequisites>
        <maven>3.0.0</maven>
    </prerequisites>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
            <comments />
        </license>
    </licenses>

    <organization>
        <name>The Cat Hive Developers</name>
        <url>http://www.cathive.com/</url>
    </organization>

    <scm>
        <connection>scm:git:https://github.com/cathive/${project.artifactId}.git</connection>
        <developerConnection>scm:git:git@github.com:cathive/${project.artifactId}.git</developerConnection>
        <url>https://github.com/cathive/${project.artifactId}/</url>
        <tag>2</tag>
    </scm>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.igor-petruk.protobuf</groupId>
                    <artifactId>protobuf-maven-plugin</artifactId>
                    <version>0.6.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.3.7</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-acr-plugin</artifactId>
                    <version>1.0</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-archetype-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <compilerId>javac</compilerId>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pdf-plugin</artifactId>
                    <version>1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.4.1</version>
                    <configuration>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <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-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <configuration>
                        <attach>true</attach>
                        <excludeResources>false</excludeResources>
                        <includePom>true</includePom>
                        <useDefaultExcludes>true</useDefaultExcludes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.3</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-servlet</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.nativelibs4java</groupId>
                <artifactId>bridj</artifactId>
                <version>${bridj.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.jdo</groupId>
                <artifactId>jdo-api</artifactId>
                <version>${jdo-api.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.jinput</groupId>
                <artifactId>jinput</artifactId>
                <version>${jinput.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.jinput</groupId>
                <artifactId>jinput-platform</artifactId>
                <version>${jinput.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-websocket</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jogamp.jogl</groupId>
                <artifactId>jogl-all</artifactId>
                <version>${jogl.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>m2eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-enforcer-plugin</artifactId>
                                                <versionRange>[1.0,)</versionRange>
                                                <goals>
                                                    <goal>enforce</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <execute>
                                                    <runOnIncremental>false</runOnIncremental>
                                                </execute>
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>os.osx</id>
            <activation>
                <os>
                    <name>Mac OS X</name>
                </os>
            </activation>
            <properties>
                <jinput.natives.classifier>natives-osx</jinput.natives.classifier>
                <jogamp.natives.classifier>macosx-universal</jogamp.natives.classifier>
                <protocCommand>/opt/local/bin/protoc</protocCommand>
            </properties>
        </profile>
        <profile>
            <id>os.windows.x86</id>
            <activation>
                <os>
                    <family>Windows</family>
                    <arch>x86</arch>
                </os>
            </activation>
            <properties>
                <jinput.natives.classifier>natives-windows</jinput.natives.classifier>
                <jogamp.natives.classifier>windows-i586</jogamp.natives.classifier>
                <protocCommand>C:\Tools\protoc.exe</protocCommand>
            </properties>
        </profile>
        <profile>
            <id>os.windows.x86_64</id>
            <activation>
                <os>
                    <family>Windows</family>
                    <arch>amd64</arch>
                </os>
            </activation>
            <properties>
                <jinput.natives.classifier>natives-windows</jinput.natives.classifier>
                <jogamp.natives.classifier>windows-amd64</jogamp.natives.classifier>
                <protocCommand>C:\Tools\protoc.exe</protocCommand>
            </properties>
        </profile>
        <profile>
            <id>os.linux.x86</id>
            <activation>
                <os>
                    <name>Linux</name>
                    <arch>i586</arch>
                </os>
            </activation>
            <properties>
                <jinput.natives.classifier>natives-linux</jinput.natives.classifier>
                <jogamp.natives.classifier>linux-i586</jogamp.natives.classifier>
                <protocCommand>/usr/bin/env protoc</protocCommand>
            </properties>
        </profile>
        <profile>
            <id>os.linux.x86_64</id>
            <activation>
                <os>
                    <name>Linux</name>
                    <arch>amd64</arch>
                </os>
            </activation>
            <properties>
                <jinput.natives.classifier>natives-linux</jinput.natives.classifier>
                <jogamp.natives.classifier>linux-amd64</jogamp.natives.classifier>
                <protocCommand>/usr/bin/env protoc</protocCommand>
            </properties>
        </profile>
    </profiles>

</project>
