<?xml version="1.0" encoding="UTF-8"?>
<!--
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright (c) 2012, Robin Jarry. All rights reserved.               *
 *                                                                     *
 * This file is part of APIWATCH and published under the BSD license.  *
 *                                                                     *
 * See the "LICENSE" file for more information.                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -->
<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>org.apiwatch</groupId>
    <artifactId>apiwatch-parent</artifactId>
    <packaging>pom</packaging>
    <version>0.1</version>
    <name>APIWatch</name>

    <description>API stability surveillance tool</description>
    <url>http://www.apiwatch.org/</url>
    <inceptionYear>2012</inceptionYear>

	<licenses>
        <license>
            <name>The New BSD License</name>
            <url>http://www.opensource.org/licenses/bsd-license.html</url>
        </license>
	</licenses>

    <developers>
        <developer>
            <id>robin-jarry</id>
            <name>Robin Jarry</name>
            <email>robin@jarry.cc</email>
        </developer>
    </developers>
    
    <scm>
        <connection>scm:git:git://github.com/apiwatch/apiwatch.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/apiwatch/apiwatch.git</developerConnection>
        <url>https://github.com/apiwatch/apiwatch</url>
      <tag>apiwatch-0.1</tag>
  </scm>

    <modules>
        <module>core</module>
        <module>cli</module>
        <module>analyser-java</module>
        <module>analyser-c</module>
        <module>serialization-json</module>
        <module>serialization-text</module>
        <module>rules-base</module>
        <module>war</module>
        <module>assembly</module>
    </modules>

	<properties>
	    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <antlr.version>3.5</antlr.version>
        <log4j.version>1.2.17</log4j.version>
	</properties>
    
    <dependencyManagement>
        <dependencies>
            <!-- MODULES -->
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-cli</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-analyser-java</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-analyser-c</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-serialization-json</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-serialization-text</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-rules-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apiwatch</groupId>
                <artifactId>apiwatch-war</artifactId>
                <version>${project.version}</version>
                <type>war</type>
            </dependency>

            <!-- EXTERNALS -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.8.1</version>
                <scope>test</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr-runtime</artifactId>
                <version>${antlr.version}</version>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>1.4.2</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jettison</groupId>
                <artifactId>jettison</artifactId>
                <version>1.3.1</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
	            <groupId>org.ini4j</groupId>
	            <artifactId>ini4j</artifactId>
	            <version>0.5.2</version>
	        </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <annotationProcessors>
                            <annotationProcessor>
                                org.apiwatch.util.APIWatchExtensionProcessor
                            </annotationProcessor>
                        </annotationProcessors>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <archive>                   
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

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

    <profiles>
        <profile>
            <id>apiwatch-release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.1.2</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.7</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
</project>
