<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>42</version>
    <relativePath/>
  </parent>

  <groupId>org.neo4j</groupId>
  <artifactId>parent</artifactId>
  <version>2.3.12</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>
    <logback-classic.version>1.1.2</logback-classic.version>
    <bouncycastle.version>1.52</bouncycastle.version>
    <generate-config-docs-phase>prepare-package</generate-config-docs-phase>
    <hsqldb.version>2.3.2</hsqldb.version>
    <test.runner.jvm.settings>-Xmx2G -XX:MaxPermSize=128M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=target/test-data -Dorg.neo4j.unsafe.impl.internal.dragons.UnsafeUtil.DIRTY_MEMORY=true -XX:-OmitStackTraceInFastThrow</test.runner.jvm.settings>
    <doclint-groups>reference</doclint-groups>
    <git.commit>unknown-commit</git.commit>
    <checkstyle.skip>true</checkstyle.skip>
  </properties>

  <modules>
    <module>community</module>
    <module>advanced</module>
    <module>enterprise</module>
    <module>integrationtests</module>
    <module>stresstests</module>
    <module>tools</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>
        <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.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.4.0</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>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.5.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
        </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>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.doc){1}|(org.neo4j.server.plugin){1}|(org.neo4j.assembly){1}|(org.neo4j.bolt){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>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <versionRange>[3.1.0,)</versionRange>
                    <goals>
                      <goal>add-source</goal>
                      <goal>compile</goal>
                      <goal>testCompile</goal>
                      <goal>doc</goal>
                      <goal>doc-jar</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <!--
     Git information extraction profiles.
     Activate by adding the required Git information to the environment, e.g. on *nix:

     export GIT_COMMIT
     GIT_COMMIT=$(git rev-parse HEAD)
    -->
    <profile>
      <id>attach-git-info-commit</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>env.GIT_COMMIT</name>
        </property>
      </activation>
      <properties>
        <git.commit>${env.GIT_COMMIT}</git.commit>
      </properties>
    </profile>

    <!-- Build configuration 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>
      <id>java8-set-javadoc-doclint</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalparam>-Xdoclint:${doclint-groups}</additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </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>

      <!-- The JUnit-Hamcrest-Mockito combo -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
          <version>1.3</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.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.9.5</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.9.5</version>
        <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.objenesis</groupId>
          <artifactId>objenesis</artifactId>
          <version>1.3</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>
        <exclusions>
          <exclusion>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
          </exclusion>
        </exclusions>
      </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>

      <!-- 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>

      <!-- Netty is used by three components: Com, Cluster and Bolt Socket Transport.
           Netty 4 is a significant improvement over Netty 3, in that it introduces
           buffer pooling (among lots of other improvements), and thus we want to move
           to Netty 4 to reduce GC overhead. Netty 4 (io.netty:netty-all) can co-exist
           with Netty 3 (io.netty:netty) because they have different modules and different
           package structure. As such, the two netty dependencies represents the in-between
           state while we move all remaining Netty 3 uses over to Netty 4 -->
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty</artifactId>
        <version>3.9.9.Final</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.0.28.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.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.2</version>
      </dependency>
      <dependency>
        <groupId>net.sf.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>2.3</version>
      </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.eclipse.jetty.websocket</groupId>
        <artifactId>websocket-client</artifactId>
        <version>9.2.10.v20150310</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>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>${bouncycastle.version}</version>
      </dependency>
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcpkix-jdk15on</artifactId>
        <version>${bouncycastle.version}</version>
      </dependency>
      <dependency>
        <groupId>org.neo4j.3rdparty.javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>1.1.2.r612</version>
      </dependency>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj</artifactId>
        <version>1.5.2</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jruby</groupId>
        <artifactId>jruby-complete</artifactId>
        <version>1.7.20</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>1.8.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-core</artifactId>
        <version>3.1.2</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-graphite</artifactId>
        <version>3.1.2</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-ganglia</artifactId>
        <version>3.1.2</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
