<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ R : A Computer Language for Statistical Data Analysis
  ~ Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
  ~ Copyright (C) 1997-2008  The R Development Core Team
  ~ Copyright (C) 2003, 2004  The R Foundation
  ~ Copyright (C) 2010 bedatadriven
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses />.
  -->

<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>org.renjin</groupId>
  <artifactId>parent</artifactId>
  <version>0.9.0-BC</version>
  <packaging>pom</packaging>
  <name>Renjin Parent</name>

  <modules>
    <module>core</module>
    <module>script-engine</module>
    <module>cli</module>
    <module>appengine</module>
    <module>tests</module>
    <module>test-packages</module>
    <module>repl</module>
    <module>packages</module>
    <module>tools</module>
    <module>studio</module>
    <module>dist/generic</module>
    <module>dist/deb</module>
    <module>appl</module>
    <module>math</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <renjin.version>${project.version}</renjin.version>
    <renjin.display.version>${project.version}</renjin.display.version>
    <asm.version>5.0.4</asm.version>
    <envClassifier>linux-x86</envClassifier>
    <jmh.version>1.11.2</jmh.version>
    <plexusCompilerVersion>2.7</plexusCompilerVersion>
  </properties>

  <scm>
    <connection>scm:git:git@github.com:bedatadriven/renjin.git</connection>
    <url>scm:git:git@github.com:bedatadriven/renjin.git</url>
    <developerConnection>scm:git:git@github.com:bedatadriven/renjin.git</developerConnection>
  </scm>

  <!--<distributionManagement>-->
    <!--<repository>-->
      <!--<id>renjin-release</id>-->
      <!--<name>Renjin Releases</name>-->
      <!--<url>https://nexus.bedatadriven.com/content/repositories/renjin-release/</url>-->
    <!--</repository>-->
    <!--<snapshotRepository>-->
      <!--<id>renjin-latest</id>-->
      <!--<name>Renjin Latest Builds</name>-->
      <!--<url>https://nexus.bedatadriven.com/content/repositories/renjin-latest/</url>-->
    <!--</snapshotRepository>-->
  <!--</distributionManagement>-->
  <distributionManagement>
    <repository>
      <id>snap-repo-public</id>
      <name>Public Maven Repository for SNAP</name>
      <url>http://nexus.senbox.net/nexus/content/repositories/releases/</url>
      <uniqueVersion>false</uniqueVersion>
    </repository>
    <snapshotRepository>
      <id>snap-repo-public</id>
      <name>Public Maven Snapshot Repository for SNAP</name>
      <url>http://nexus.senbox.net/nexus/content/repositories/snapshots/</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>


  <repositories>

    <!-- We go to mvnsearch.org after latest GAE SDK artifacts -->
    <repository>
      <id>snap-repo-public</id>
      <name>Public Maven Repository for SNAP</name>
      <url>http://nexus.senbox.net/nexus/content/repositories/public/</url>
      <releases>
        <enabled>true</enabled>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <checksumPolicy>warn</checksumPolicy>
      </snapshots>
    </repository>
    <repository>
      <id>bedatadriven</id>
      <name>bedatadriven public repo</name>
      <url>https://nexus.bedatadriven.com/content/groups/public/</url>
    </repository>

  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <encoding>UTF-8</encoding>
              <consoleOutput>true</consoleOutput>
              <failsOnError>true</failsOnError>
              <includeResources>false</includeResources>
              <checkstyleRules>
                <module name="Checker">
                  <!--<module name="UnusedImports"/>-->
                  <!--<module name="RedundantImport"/>-->
                  <module name="TreeWalker">
                    <module name="OuterTypeFilename"/>
                    <module name="OneTopLevelClass"/>

                    <module name="NoFinalizer"/>
                    <!--<module name="LineLength">-->
                    <!--<property name="max" value="120"/>-->
                    <!--<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>-->
                    <!--</module>-->
                    <module name="OneTopLevelClass"/>
                    <module name="NeedBraces"/>
                    <module name="Indentation">
                      <property name="basicOffset" value="2"/>
                      <property name="braceAdjustment" value="0"/>
                      <property name="caseIndent" value="2"/>
                      <property name="throwsIndent" value="4"/>
                      <property name="lineWrappingIndentation" value="4"/>
                      <property name="arrayInitIndent" value="2"/>
                    </module>
                    <module name="PackageName">
                      <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
                      <message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
                    </module>
                  </module>
                </module>
              </checkstyleRules>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
            <outputEncoding>UTF-8</outputEncoding>
            <inputEncoding>UTF-8</inputEncoding>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <versionRange>[1.2,)</versionRange>
                    <goals>
                      <goal>exec</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>


  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>2.5.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>bc-guava</artifactId>
        <version>17.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>linux-64</id>
      <activation>
        <os>
          <family>unix</family>
          <name>linux</name>
          <arch>x86_64</arch>
        </os>
      </activation>
      <properties>
        <envClassifier>linux-x86_64</envClassifier>
      </properties>
    </profile>
    <profile>
      <id>linux-64-amd</id>
      <activation>
        <os>
          <family>unix</family>
          <name>linux</name>
          <arch>amd64</arch>
        </os>
      </activation>
      <properties>
        <envClassifier>linux-x86_64</envClassifier>
      </properties>
    </profile>
    <profile>
      <id>linux-x86</id>
      <activation>
        <os>
          <family>unix</family>
          <name>linux</name>
          <arch>x86</arch>
        </os>
      </activation>
      <properties>
        <envClassifier>linux-x86</envClassifier>
      </properties>
    </profile>
    <profile>
      <id>linux-i386</id>
      <activation>
        <os>
          <family>unix</family>
          <name>linux</name>
          <arch>i386</arch>
        </os>
      </activation>
      <properties>
        <envClassifier>linux-x86</envClassifier>
      </properties>
    </profile>

    <profile>
      <id>apple-x86_64</id>
      <activation>
        <os>
          <family>mac</family>
          <arch>x86_64</arch>
        </os>
      </activation>
      <properties>
        <envClassifier>apple-x86_64</envClassifier>
      </properties>
    </profile>

  </profiles>
</project>
