<?xml version="1.0"?>
<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">
  <parent>
    <groupId>org.neo4j</groupId>
    <artifactId>cypher-parent</artifactId>
    <version>3.3.4</version>
    <relativePath>../</relativePath>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>neo4j-cypher-frontend-3.3</artifactId>
  <packaging>jar</packaging>
  <version>3.3.4</version>
  <name>Neo4j - Cypher Frontend 3.3</name>

  <description>Front end of the Cypher compiler</description>
  <url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>

  <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</url>
  </scm>

  <properties>
    <version-package>cypher.internal.frontend.v3_1</version-package>
    <scala.version>2.11.12</scala.version>
    <scala.binary.version>2.11</scala.binary.version>
    <license.header>${project.baseUri}/ASL-2-header.txt</license.header>
  </properties>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <build>
    <plugins>

      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <configuration>
          <scalaVersion>${scala.version}</scalaVersion>
          <scalaCompatVersion>${scala.binary.version}</scalaCompatVersion>
          <args>
            <arg>-Xmax-classfile-name</arg>
            <arg>100</arg>
            <arg>-Xlint</arg>
            <arg>-target:jvm-${maven.compiler.target}</arg>
          </args>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.scalastyle</groupId>
        <artifactId>scalastyle-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.neo4j.build.plugins</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <!-- inserting licenses is better than checking for them -->
        <executions>
          <execution>
            <id>check-licenses</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>insert-licenses</id>
            <phase>initialize</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <strictCheck>true</strictCheck>
          <header>${license.header}</header>
          <includes>
            <include>src/**/*.java</include>
            <include>src/**/*.scala</include>
          </includes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
            <scala>SLASHSTAR_STYLE</scala>
          </mapping>
          <timestampPropertyName>currentYear</timestampPropertyName>
          <properties>
            <inceptionYear>2002</inceptionYear>
          </properties>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <dependencies>

    <!-- shared versions are defined in the parent pom -->

    <!-- scala -->

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

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

    <!-- scala test dependencies -->

    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.11</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.11</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- other -->

    <dependency>
      <groupId>org.parboiled</groupId>
      <artifactId>parboiled-scala_2.11</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>neo-full-build-with-javadoc</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>fullBuild</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <id>generate-dummy-javadocs-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <classifier>javadoc</classifier>
                  <excludes>
                    <exclude>**</exclude>
                  </excludes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
