<?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>ch.epfl.bbp.nlp</groupId>
    <artifactId>bluima_parent</artifactId>
    <version>1.0.1</version>
    <packaging>pom</packaging>
    <name>Bluima Parent POM with release info</name>
    <description>Parent POM for bluima project with release info, but no dependency</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit.version>4.12</junit.version>
        <uima.version>2.6.0</uima.version>
        <ruta.version>2.1.0</ruta.version>
    </properties>


    <modules>
        <!-- utils and typesystem: do not depend on UIMA -->
        <module>utils/blue_commons</module>
        <module>utils/pdf_glyph_mapping</module>
        <module>utils/mallet_utils</module>
        <module>modules/bluima_typesystem</module>

        <module>modules</module>
    </modules>


    <organization>
        <name>Bluebrain Project</name>
        <url>bluebrain.epfl.ch</url>
    </organization>
    <developers>
        <developer>
            <name>Renaud Richardet</name>
            <email>renaud.richardet@epfl.ch</email>
        </developer>
        <developer>
            <name>Jean-Cedric Chappelier</name>
            <email>jean-cedric.chappelier@epfl.ch</email>
        </developer>
        <developer>
            <name>Martin Telefont</name>
            <email>martin.telefont@epfl.ch</email>
        </developer>
        <developer>
            <name>Joelle Portmann</name>
            <email>joelle.portmann@epfl.ch</email>
        </developer>
        <developer>
            <name>Marc Zimmermann</name>
            <email>marc.zimmermann@epfl.ch</email>
        </developer>
        <developer>
            <name>Orianne Rollier</name>
            <email>orianne.rollier@epfl.ch</email>
        </developer>
        <developer>
            <name>Favrod Philémon</name>
            <email>philemon.favrod@epfl.ch</email>
        </developer>
        <developer>
            <name>Erick Michael Cobos Tandazo</name>
            <email>erick.cobos@epfl.ch</email>
        </developer>
        <developer>
            <name>Marco Antognini</name>
            <email>marco.antognini@epfl.ch</email>
        </developer>
    </developers>
    <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>


    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    <scm>
        <connection>scm:git:git@github.com:BlueBrain/bluima</connection>
        <developerConnection>scm:git:git@github.com:BlueBrain/bluima</developerConnection>
        <url>http://github.com/BlueBrain/bluima</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>

    <build>
        <plugins>
            <!-- compile with java 1.7 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                    <systemProperties>
                        <property>
                              <name>bluima_home</name>
                             <value>${bluima_home}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <!-- more memory & set resource directory for tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <argLine>-Xms1G -Xmx2G</argLine>
                    <systemPropertyVariables>
                        <BLUIMA_RESOURCE_DIR>${project.parent.basedir}/../resources/</BLUIMA_RESOURCE_DIR>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <!-- attach sources to jars-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Add git revision number -->
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>2.1.11</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                         </goals>
                    </execution>
                </executions>
                <configuration>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename>
				</configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>

                <!-- nexus release -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>

                <!-- prevents error in eclipse m2e plugin -->
                <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-dependency-plugin</artifactId>
                                        <versionRange>[2.0,)</versionRange>
                                        <goals>
                                            <goal>copy-dependencies</goal>
                                            <goal>unpack</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <!-- NO DEPENDENCIES -->
    <dependencies>
    </dependencies>
    <repositories>
    </repositories>
    <pluginRepositories>
    </pluginRepositories>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- create javadocs -->
                    <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-javadoc-plugin</artifactId>
                      <version>2.9.1</version>
                      <executions>
                        <execution>
                          <id>attach-javadocs</id>
                          <goals>
                            <goal>jar</goal>
                          </goals>
                        </execution>
                      </executions>
                    </plugin>
                    <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>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.3</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <stagingProfileId>864df237df1ef3</stagingProfileId>
                        </configuration>
                    </plugin>
                    <!--GPG for Nexus -->
                     <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <version>1.5</version>
                      <executions>
                        <execution>
                          <id>sign-artifacts</id>
                          <phase>verify</phase>
                          <goals>
                            <goal>sign</goal>
                          </goals>
                        </execution>
                      </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
