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

  <groupId>org.neo4j</groupId>
  <artifactId>parent</artifactId>
  <version>1.9.RC2</version>
  <packaging>pom</packaging>
  <name>Neo4j</name>
  <description>Neo4j Graph Database</description>
  
  <properties>
    <neo4j.java.version>1.6</neo4j.java.version>
    <jta.groupId>org.apache.geronimo.specs</jta.groupId>
    <jta.artifactId>geronimo-jta_1.1_spec</jta.artifactId>
    <jta.version>1.1.1</jta.version>
    <cuke4duke.version>0.4.4</cuke4duke.version>
    <pico.version>2.11.2</pico.version>
    <licensing.prepend.text>notice-agpl-prefix.txt</licensing.prepend.text>
    <licensing.phase>compile</licensing.phase>
    <lucene.version>3.6.2</lucene.version>
  </properties>

  <modules>
    <module>community</module>
    <module>advanced</module>
    <module>enterprise</module>
    <module>cypher-plugin</module>
    <module>gremlin-plugin</module>
  </modules>
  
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>pl.project13.maven</groupId>
          <artifactId>git-commit-id-plugin</artifactId>
          <version>2.1.4</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.doc){1}|(org.neo4j.server.plugin){1}|(org.neo4j.assembly){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>
        </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>
  </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.0.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.0.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.0.1</version>
        <classifier>tests</classifier>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>cuke4duke</groupId>
        <artifactId>cuke4duke</artifactId>
        <version>${cuke4duke.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.picocontainer</groupId>
        <artifactId>picocontainer</artifactId>
        <version>${pico.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.9.0</version>
        <scope>test</scope>
      </dependency>

      <!-- other -->
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.2</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>1.4</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.16</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>0.9.30</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>0.9.30</version>
      </dependency>
      <dependency>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-access</artifactId>
          <version>0.9.30</version>
      </dependency>
      <dependency>
          <groupId>janino</groupId>
          <artifactId>janino</artifactId>
          <version>2.5.10</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.9</version>
      </dependency>
      <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-server</artifactId>
        <version>1.9</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <distributionManagement>
    <site>
      <id>neo4j-site</id>
      <url>scpexe://static.neo4j.org/var/www/components.neo4j.org/${project.artifactId}/${project.version}</url>
    </site>
  </distributionManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>2.7.1</version>
        <configuration>
          <linkXref>true</linkXref>
          <sourceEncoding>utf-8</sourceEncoding>
          <minimumTokens>100</minimumTokens>
          <targetJdk>1.6</targetJdk>
          <rulesets>
            <ruleset>${project.basedir}/code-analysis/pmd.xml</ruleset>
          </rulesets>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

</project>
