<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>
  
  <parent>
    <groupId>org.neo4j</groupId>
    <artifactId>parent</artifactId>
    <version>2.0.3</version>
    <relativePath>../..</relativePath>
  </parent>

  <artifactId>cypher-parent</artifactId>
  <version>2.0.3</version>
  <packaging>pom</packaging>
  <name>Neo4j Community Cypher Build</name>
  <description>Project that builds the Neo4j Cypher modules as part of the Community distribution.</description>
  <url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>

  <properties>
    <bundle.namespace>org.neo4j.cypher</bundle.namespace>
    <scala.version>2.10.3</scala.version>
    <docs.url>http://docs.neo4j.org/chunked/${project.version}/cypher-query-lang.html</docs.url>
    <short-name>community-cypher-build</short-name>
    <licensing.prepend.text>notice-gpl-prefix.txt</licensing.prepend.text>
    <license-text.header>GPL-3-header.txt</license-text.header>
    <docs-plugin.skip>true</docs-plugin.skip>
    <maven.site.skip>true</maven.site.skip>
    <maven.site.deploy.skip>true</maven.site.deploy.skip>
  </properties>

  <scm>
    <connection>scm:git:git://github.com/neo4j/neo4j.git</connection>
    <developerConnection>scm:git:git@github.com:neo4j/neo4j.git</developerConnection>
    <url>https://github.com/neo4j/neo4j/tree/master/community/cypher</url>
  </scm>

  <modules>
    <module>cypher-commons</module>
    <module>cypher-compiler-1.9</module>
    <module>cypher-compiler-2.0</module>
    <module>cypher</module>
    <module>cypher-docs</module>
  </modules>

  <repositories>
    <repository>
      <id>oss.sonatype.org</id>
      <name>releases</name>
      <url>http://oss.sonatype.org/content/repositories/releases</url>
    </repository>
  </repositories>

  <build>
    <plugins>

      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>scala-compile</id>
            <goals>
              <goal>add-source</goal>
              <goal>compile</goal>
            </goals>
            <phase>process-resources</phase>
          </execution>
          <execution>
            <id>scala-test-compile</id>
            <phase>${scala-test-compile-phase}</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <jvmArgs>
            <jvmArg>-Xms64m</jvmArg>
            <jvmArg>-Xmx1024m</jvmArg>
          </jvmArgs>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <reportPlugins combine.children="append">
            <plugin>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <detectJavaApiLink>true</detectJavaApiLink>
                <detectLinks>true</detectLinks>
                <quiet>true</quiet>
                <excludePackageNames>*.impl.*</excludePackageNames>
              </configuration>
              <reports>
                <report>javadoc</report>
              </reports>
            </plugin>
            <!-- Scala API Documentation if we want it -->
            <!--
            <plugin>
              <groupId>org.scala-tools</groupId>
              <artifactId>maven-scala-plugin</artifactId>
            </plugin>
            -->
          </reportPlugins>
        </configuration>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>2.7.1</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>neo-scala-style</id>

      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>scalaStyle</name>
        </property>
      </activation>

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.scalastyle</groupId>
              <artifactId>scalastyle-maven-plugin</artifactId>
              <version>0.2.0</version>
              <configuration>
                <verbose>false</verbose>
                <failOnViolation>true</failOnViolation>
                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                <failOnWarning>false</failOnWarning>
                <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
                <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
                <configLocation>${basedir}/etc/scalastyle_config.xml</configLocation>
                <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
                <outputEncoding>UTF-8</outputEncoding>
              </configuration>
              <executions>
                <execution>
                  <goals>
                    <goal>check</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

  <!-- inherited dependencies, versions are set in dependencyManagement -->

  <dependencies>

    <!-- scala -->

    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
    </dependency>

    <!-- testing -->

    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.10</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.scalautils</groupId>
      <artifactId>scalautils_2.10</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.scalacheck</groupId>
      <artifactId>scalacheck_2.10</artifactId>
      <scope>test</scope>
    </dependency>
   <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

  </dependencies>

  <!-- Required versions for each dependency, inherited dependencies are set in dependencies -->

  <dependencyManagement>
    <dependencies>

      <!-- scala -->

      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
      </dependency>

      <!-- testing -->

      <dependency>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest_2.10</artifactId>
        <version>2.0</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <artifactId>scala-library</artifactId>
            <groupId>org.scala-lang</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.scalautils</groupId>
        <artifactId>scalautils_2.10</artifactId>
        <version>2.0</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <artifactId>scala-library</artifactId>
            <groupId>org.scala-lang</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.scalacheck</groupId>
        <artifactId>scalacheck_2.10</artifactId>
        <version>1.11.0</version>
        <scope>test</scope>
      </dependency>

      <!-- neo4j -->

      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-kernel</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-kernel</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-graphviz</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-lucene-index</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-graph-matching</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-graph-algo</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- other -->

      <dependency>
        <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
        <artifactId>concurrentlinkedhashmap-lru</artifactId>
        <version>1.3.1</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.7</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.parboiled</groupId>
        <artifactId>parboiled-scala_2.10</artifactId>
        <version>1.1.6</version>
        <exclusions>
          <exclusion>
            <artifactId>scala-library</artifactId>
            <groupId>org.scala-lang</groupId>
          </exclusion>
        </exclusions>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <distributionManagement>
    <site>
      <id>neo4j-site</id>
      <url>scpexe://docs.neo4j.org/data/www/doc/components.neo4j.org/${project.artifactId}/${project.version}</url>
    </site>
  </distributionManagement>

</project>
