<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.build</groupId>
    <artifactId>parent-central</artifactId>
    <version>41</version>
    <relativePath/>
  </parent>

  <groupId>org.neo4j</groupId>
  <artifactId>parent</artifactId>
  <version>2.2.5</version>
  <packaging>pom</packaging>
  <name>Neo4j</name>
  <description>Neo4j Graph Database</description>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <jta.groupId>org.apache.geronimo.specs</jta.groupId>
    <jta.artifactId>geronimo-jta_1.1_spec</jta.artifactId>
    <jta.version>1.1.1</jta.version>
    <pico.version>2.14.3</pico.version>
    <licensing.prepend.text>notice-agpl-prefix.txt</licensing.prepend.text>
    <licensing.phase>compile</licensing.phase>
    <lucene.version>3.6.2</lucene.version>
    <powermock.version>1.5.5</powermock.version>
    <slf4j-api.version>1.7.7</slf4j-api.version>
    <logback-classic.version>1.1.2</logback-classic.version>
    <generate-config-docs-phase>prepare-package</generate-config-docs-phase>
    <hsqldb.version>2.3.2</hsqldb.version>
    <test.runner.jvm.settings>-Xmx1G -XX:MaxPermSize=128M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=target/test-data</test.runner.jvm.settings>
  </properties>

  <modules>
    <module>community</module>
    <module>advanced</module>
    <module>enterprise</module>
    <module>integrationtests</module>
    <module>stresstests</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>${test.runner.jvm.settings}</argLine>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <argLine>${test.runner.jvm.settings}</argLine>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-version</id>
            <phase>generate-sources</phase>
            <configuration>
              <target if="version-package">
                <macrodef name="generate-version">
                  <attribute name="package" />
                  <sequential>
                    <local name="the-package" />
                    <local name="version-dir" />
                    <property name="the-package" value="@{package}" />
                    <loadresource property="version-dir">
                      <propertyresource name="the-package"/>
                      <filterchain>
                        <tokenfilter>
                          <filetokenizer/>
                          <replacestring from="." to="/"/>
                        </tokenfilter>
                      </filterchain>
                    </loadresource>
                    <mkdir dir="target/generated-sources/version/org/neo4j/${version-dir}/" />
                    <property name="build.number" value="${env.BUILD_NUMBER}" />
                    <property name="git.describe" value="${git.commit.id.describe}" />
                    <property name="git.branch" value="${git.commit.id.branch}" />
                    <property name="git.commit" value="${git.commit.id}" />
                    <echo file="target/generated-sources/version/org/neo4j/${version-dir}/ComponentVersion.java">package org.neo4j.${the-package};

import org.neo4j.kernel.Version;
import org.neo4j.helpers.Service;

@Service.Implementation(Version.class)
@SuppressWarnings("deprecation")
public class ComponentVersion extends Version
{
    public ComponentVersion() { super("${project.artifactId}", "${project.version}"); }
    public @Override String getReleaseVersion() { return "${project.version}"; }
    protected @Override String getBuildNumber() { return "${build.number}"; }
    protected @Override String getCommitId() { return "${git.commit}"; }
    protected @Override String getBranchName() { return "${git.branch}"; }
    protected @Override String getCommitDescription() { return "${git.describe}"; }
}
</echo>
                  </sequential>
                </macrodef>
                <generate-version package="${version-package}" />
              </target>
            </configuration>
            <goals><goal>run</goal></goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant-launcher</artifactId>
            <version>1.8.4</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals><goal>add-source</goal></goals>
            <configuration>
              <sources>
                <source>target/generated-sources/version</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.neo4j.build.plugins</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.3.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.1</version>
          <!-- 2.1 ? Yes, 2.0 has maven3 issues -->
        </plugin>
        <plugin>
          <groupId>com.voltvoodoo</groupId>
          <artifactId>brew</artifactId>
          <version>0.2.10</version>
        </plugin>
        <plugin>
          <groupId>com.github.searls</groupId>
          <artifactId>jasmine-maven-plugin</artifactId>
          <version>1.2.0.0</version>
        </plugin>
        <plugin>
          <groupId>pl.project13.maven</groupId>
          <artifactId>git-commit-id-plugin</artifactId>
          <version>2.1.5</version>
          <executions>
            <execution>
              <id>generate-git-hash</id>
              <goals>
                <goal>revision</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <skipPoms>false</skipPoms>
            <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
            <gitDescribe>
              <dirty>-dirty</dirty>
              <abbrev>7</abbrev>
              <forceLongFormat>true</forceLongFormat>
            </gitDescribe>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.neo4j.build.plugins</groupId>
          <artifactId>licensing-maven-plugin</artifactId>
          <version>1.7.5</version>
          <configuration>
            <failIfDisliked>true</failIfDisliked>
            <failIfMissing>true</failIfMissing>
            <plainTextReport>true</plainTextReport>
            <prependText>${licensing.prepend.text}</prependText>
            <excludedGroups>
              ^((org.neo4j){1}|(org.neo4j.app){1}|(org.neo4j.browser){1}|(org.neo4j.doc){1}|(org.neo4j.server.plugin){1}|(org.neo4j.assembly){1}|(org.neo4j.build){1}|(org.neo4j.examples){1})$
            </excludedGroups>
            <includedScopes>compile</includedScopes>
          </configuration>
          <executions>
            <execution>
              <id>enforce-licensing-oss</id>
              <phase>${licensing.phase}</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <licensingRequirementFiles>
                  <licensingRequirementFile>licensing-requirements-base.xml</licensingRequirementFile>
                  <licensingRequirementFile>licensing-requirements-oss.xml</licensingRequirementFile>
                </licensingRequirementFiles>
                <thirdPartyLicensingFilename>${project.artifactId}-${project.version}-oss.txt
                </thirdPartyLicensingFilename>
              </configuration>
            </execution>
            <execution>
              <id>enforce-licensing-com</id>
              <phase>${licensing.phase}</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <licensingRequirementFiles>
                  <licensingRequirementFile>licensing-requirements-base.xml</licensingRequirementFile>
                  <licensingRequirementFile>licensing-requirements-com.xml</licensingRequirementFile>
                </licensingRequirementFiles>
                <thirdPartyLicensingFilename>${project.artifactId}-${project.version}.txt</thirdPartyLicensingFilename>
              </configuration>
            </execution>
            <execution>
              <id>list-all-licenses</id>
              <phase>${licensing.phase}</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <licensingRequirementFiles>
                  <licensingRequirementFile>licensing-requirements-base.xml</licensingRequirementFile>
                </licensingRequirementFiles>
                <thirdPartyLicensingFilename>${project.artifactId}-${project.version}-NOTICE.txt
                </thirdPartyLicensingFilename>
                <checkExistingNoticeFile>${project.build.directory}/../NOTICE.txt</checkExistingNoticeFile>
                <listPrependText>list-prefix.txt</listPrependText>
                <listReport>${project.artifactId}-${project.version}-LICENSES.txt</listReport>
                <checkExistingLicensesFile>${project.build.directory}/../LICENSES.txt</checkExistingLicensesFile>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.neo4j.build</groupId>
              <artifactId>licensecheck-config</artifactId>
              <version>${project.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>neo-full-build</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>fullBuild</name>
        </property>
      </activation>
      <modules>
        <module>manual</module>
        <module>packaging</module>
        <module>packaging/installer-linux</module>
      </modules>
      <properties>
        <attach-docs-phase>verify</attach-docs-phase>
      </properties>
    </profile>
    <profile>
      <id>neodev</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <attach-test-jar-phase>package</attach-test-jar-phase>
      </properties>
      <build>
        <plugins>
          <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>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <configuration>
              <xmlOutput>true</xmlOutput>
              <findbugsXmlOutput>true</findbugsXmlOutput>
              <!-- For jenkins to pick stuff up -->
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>neo-docs-build</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>docsBuild</name>
        </property>
      </activation>
      <modules>
        <module>manual</module>
      </modules>
      <properties>
        <attach-java-sources-phase>package</attach-java-sources-phase>
        <attach-java-test-sources-phase>package</attach-java-test-sources-phase>
        <attach-test-jar-phase>package</attach-test-jar-phase>
        <attach-docs-phase>verify</attach-docs-phase>
        <integration-test-phase>integration-test</integration-test-phase>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <includes>
                  <include>**/DocTest*.java</include>
                  <include>**/*DocTest.java</include>
                  <include>**/*DocTests.java</include>
                  <include>**/*DocTestCase.java</include>
                </includes>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-failsafe-plugin</artifactId>
              <configuration>
                <includes>
                  <include>**/DocIT*.java</include>
                  <include>**/*DocIT.java</include>
                  <include>**/*DocITCase.java</include>
                </includes>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>neo-minimal-build</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>minimalBuild</name>
        </property>
      </activation>
      <properties>
        <test-resources-phase>none</test-resources-phase>
        <test-compile-phase>none</test-compile-phase>
        <test-phase>none</test-phase>
        <attach-test-jar-phase>none</attach-test-jar-phase>
        <scala-test-compile-phase>none</scala-test-compile-phase>
      </properties>
    </profile>
    <profile>
      <id>has-sources</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <file>
          <exists>src/main</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.neo4j.build.plugins</groupId>
            <artifactId>licensing-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile><!-- used for testing -->
      <id>unix-dependency-tools.jar</id>
      <activation>
        <file>
          <exists>${java.home}/../lib/tools.jar</exists>
        </file>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.sun.tools</groupId>
          <artifactId>tools</artifactId>
          <version>${sun.tools.version}</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
          <optional>true</optional>
        </dependency>
      </dependencies>
    </profile>
    <profile><!-- used for testing -->
      <id>Windows-dependency-tools.jar</id>
      <activation>
        <os>
          <family>Windows</family>
        </os>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.sun.tools</groupId>
          <artifactId>tools</artifactId>
          <version>${sun.tools.version}</version>
          <scope>system</scope>
          <systemPath>${java.home}\\..\\lib\\tools.jar</systemPath>
          <optional>true</optional>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-core</artifactId>
        <version>${lucene.version}</version>
      </dependency>
      <!-- special -->
      <dependency>
        <groupId>${jta.groupId}</groupId>
        <artifactId>${jta.artifactId}</artifactId>
        <version>${jta.version}</version>
      </dependency>
      <!-- testing -->
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.3.4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.3.2</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.3.4</version>
        <classifier>tests</classifier>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.picocontainer</groupId>
        <artifactId>picocontainer</artifactId>
        <version>${pico.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.9.5</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-module-junit4</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-api-mockito</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
<!--
      <dependency>
        <groupId>org.ow2.jotm</groupId>
        <artifactId>jotm-core</artifactId>
        <version>2.2.3</version>
        <scope>test</scope>
      </dependency>
-->
      <dependency>
        <groupId>geronimo-spec</groupId>
        <artifactId>geronimo-spec-j2ee</artifactId>
        <version>1.4-rc4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>${hsqldb.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.9</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>

      <!-- other -->
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.4</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
      </dependency>
      <dependency>
        <groupId>commons-configuration</groupId>
        <artifactId>commons-configuration</artifactId>
        <version>1.10</version>
        <type>jar</type>
        <scope>compile</scope>
        <exclusions>
          <exclusion>
            <artifactId>commons-digester</artifactId>
            <groupId>commons-digester</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <!-- Added (directly) to avoid version clash in commons-configuration. -->
      <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>2.1</version>
        <type>jar</type>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.3.2</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty</artifactId>
        <version>3.6.3.Final</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback-classic.version}</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>${logback-classic.version}</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-access</artifactId>
        <version>${logback-classic.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-api.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j-api.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.janino</groupId>
        <artifactId>janino</artifactId>
        <version>2.6.1</version>
      </dependency>
      <dependency>
        <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
        <artifactId>concurrentlinkedhashmap-lru</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>net.sf.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>2.3</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi_R4_core</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi_R4_compendium</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-client</artifactId>
        <version>1.19</version>
        <exclusions>
          <exclusion>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-server</artifactId>
        <version>1.19</version>
        <exclusions>
          <exclusion>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-servlet</artifactId>
        <version>1.19</version>
        <exclusions>
          <exclusion>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.sun.jersey.contribs</groupId>
        <artifactId>jersey-multipart</artifactId>
        <version>1.19</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.9.13</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.9.13</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.13</version>
      </dependency>
      <dependency>
        <groupId>org.rrd4j</groupId>
        <artifactId>rrd4j</artifactId>
        <version>2.2</version>
      </dependency>
      <dependency>
        <groupId>org.mozilla</groupId>
        <artifactId>rhino</artifactId>
        <version>1.7R4</version>
      </dependency>
      <dependency>
        <groupId>bouncycastle</groupId>
        <artifactId>bcprov-jdk16</artifactId>
        <version>140</version>
      </dependency>
      <dependency>
        <groupId>org.neo4j.3rdparty.javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>1.1.2.r612</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
