<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.neo4j.build</groupId>
    <artifactId>grandparent</artifactId>
    <version>41</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <name>The Neo4j Graph Database Project - Parent</name>
  <description>Neo4j is a high-performance, NOSQL graph database with all the features of a mature and robust database. </description>
  <inceptionYear>2002</inceptionYear>
  <packaging>pom</packaging>
  <url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>
  <groupId>org.neo4j.build</groupId>
  <artifactId>parent-central</artifactId>
  <version>41</version>

  <modules>
    <module>parent</module>
    <module>examples-assembly-descriptor</module>
  </modules>

  <properties>
    <skinGroupId>org.neo4j.maven.skins</skinGroupId>
    <skinArtifactId>default-skin</skinArtifactId>
    <skinVersion>4</skinVersion>
    <licensesVersion>7</licensesVersion>
    <license-text.header>AGPL-3-header.txt</license-text.header>
    <short-name>parent-central</short-name>
    <docs-plugin.filter>false</docs-plugin.filter>
    <docs-plugin.skip>false</docs-plugin.skip>
    <!--  set default phases for plugins -->
    <attach-java-sources-phase>none</attach-java-sources-phase>
    <attach-java-test-sources-phase>none</attach-java-test-sources-phase>
    <attach-test-jar-phase>package</attach-test-jar-phase>
    <attach-docs-phase>none</attach-docs-phase>
    <attach-javadoc-phase>none</attach-javadoc-phase>
    <create-site-phase>none</create-site-phase>
    <attach-descriptor-phase>none</attach-descriptor-phase>
    <test-resources-phase>process-test-resources</test-resources-phase>
    <test-compile-phase>test-compile</test-compile-phase>
    <test-phase>test</test-phase>
    <scala-test-compile-phase>process-test-resources</scala-test-compile-phase>
    <integration-test-phase>none</integration-test-phase>
    <integration-verify-phase>none</integration-verify-phase>
    <clirr-check-phase>none</clirr-check-phase>
  </properties>

  <licenses>
    <license>
      <name>GNU Affero General Public License, Version 3</name>
      <url>http://www.gnu.org/licenses/agpl-3.0-standalone.html</url>
    </license>
  </licenses>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.3</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-core</artifactId>
              <version>1.4</version>
            </dependency>
            <dependency>
              <groupId>${skinGroupId}</groupId>
              <artifactId>${skinArtifactId}</artifactId>
              <version>${skinVersion}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.neo4j.build.plugins</groupId>
          <artifactId>ease-maven-plugin</artifactId>
          <version>1</version>
        </plugin>
        <plugin>
          <groupId>org.neo4j.build.plugins</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>3</version>
        </plugin>
        <plugin>
          <groupId>org.neo4j.build.plugins</groupId>
          <artifactId>docs-maven-plugin</artifactId>
          <version>5</version>
          <configuration>
            <filter>${docs-plugin.filter}</filter>
            <skipdocs>${docs-plugin.skip}</skipdocs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <executions>
            <execution>
              <id>integration-test</id>
              <phase>${integration-test-phase}</phase>
              <goals>
                <goal>integration-test</goal>
              </goals>
            </execution>
            <execution>
              <id>integration-verify</id>
              <phase>${integration-verify-phase}</phase>
              <goals>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.neo4j.build.plugins</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <versionRange>[1,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.neo4j.build.plugins</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <versionRange>[1,)</versionRange>
                    <goals>
                      <goal>format</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.neo4j.build.plugins</groupId>
                    <artifactId>docs-maven-plugin</artifactId>
                    <versionRange>[2,)</versionRange>
                    <goals>
                      <goal>assemble</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>default-testResources</id>
            <phase>${test-resources-phase}</phase>
            <goals><goal>testResources</goal></goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadoc</id>
            <phase>${attach-javadoc-phase}</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.neo4j.build.plugins</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.neo4j.maven</groupId>
            <artifactId>licenses</artifactId>
            <version>${licensesVersion}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>check-licenses</id>
            <!-- fail as early as possible -->
            <phase>initialize</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <strictCheck>true</strictCheck>
          <header>${license-text.header}</header>
          <includes>
            <include>src/**/*.java</include>
            <include>src/**/*.js</include>
            <include>src/**/*.scala</include>
            <include>src/**/*.xml</include>
          </includes>
          <excludes>
            <exclude>**/lib/*.js</exclude>
            <exclude>**/lib/**/*.js</exclude>
            <exclude>**/javascript/vend/**</exclude>
          </excludes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
            <scala>SLASHSTAR_STYLE</scala>
          </mapping>
          <timestampPropertyName>currentYear</timestampPropertyName>
          <properties>
            <inceptionYear>${project.inceptionYear}</inceptionYear>
          </properties>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-test-jar</id>
            <phase>${attach-test-jar-phase}</phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
       <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-testCompile</id>
            <phase>${test-compile-phase}</phase>
          </execution>
        </executions>
      </plugin>
     <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-java-sources</id>
            <phase>${attach-java-sources-phase}</phase>
            <goals><goal>jar-no-fork</goal></goals>
          </execution>
          <execution>
            <id>attach-java-test-sources</id>
            <phase>${attach-java-test-sources-phase}</phase>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-test-sources</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>${test-phase}</phase>
            <goals><goal>test</goal></goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.neo4j.build.plugins</groupId>
        <artifactId>docs-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-docs</id>
            <phase>${attach-docs-phase}</phase>
            <goals><goal>assemble</goal></goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <id>create-site</id>
            <phase>${create-site-phase}</phase>
          </execution>
          <execution>
            <id>attach-descriptor</id>
            <phase>${attach-descriptor-phase}</phase>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>parent-attach-descriptor</id>
            <phase>package</phase>
            <inherited>false</inherited>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

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

  <profiles>
    <profile>
      <id>neo-full-build</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>fullBuild</name>
        </property>
      </activation>
      <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>
        <attach-javadoc-phase>package</attach-javadoc-phase>
        <attach-descriptor-phase>none</attach-descriptor-phase>
        <integration-test-phase>integration-test</integration-test-phase>
        <integration-verify-phase>verify</integration-verify-phase>
        <clirr-check-phase>verify</clirr-check-phase>
      </properties>
    </profile>
    <profile>
      <id>run-integration-tests</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>runITs</name>
        </property>
      </activation>
      <properties>
        <integration-test-phase>integration-test</integration-test-phase>
        <integration-verify-phase>verify</integration-verify-phase>
      </properties>
    </profile>
    <profile>
      <id>run-clirr</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>runClirr</name>
        </property>
      </activation>
      <properties>
        <clirr-check-phase>verify</clirr-check-phase>
      </properties>
    </profile>
    <profile>
      <id>freeze</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>freeze</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
          <groupId>org.neo4j.build.plugins</groupId>
          <artifactId>ease-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>freeze-artifacts</id>
                <goals>
                  <goal>freeze</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

