<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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
    <relativePath />
  </parent>
  <artifactId>docs-maven-plugin</artifactId>
  <groupId>org.neo4j.build.plugins</groupId>
  <packaging>maven-plugin</packaging>
  <version>4</version>
  <name>Neo4j documentation assembler</name>
  <description>Tool to filter and package documentation files, 
    including executing a documentation-generating test
    and then install the assembled docs in the local repo.</description>
  <url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>
  <inceptionYear>2011</inceptionYear>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
    <currentYear>${maven.build.timestamp}</currentYear>
    <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>
    <docs.url>http://docs.neo4j.org/</docs.url>
  </properties>

  <organization>
    <name>The Neo4j Graph Database Project</name>
    <url>http://neo4j.org/</url>
  </organization>

  <scm>
    <connection>scm:git:git://github.com/neo4j/docs-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:neo4j/docs-maven-plugin.git</developerConnection>
    <url>https://github.com/neo4j/docs-maven-plugin</url>
  </scm>

  <mailingLists>
    <mailingList>
      <name>Neo4j Community Discussions</name>
      <subscribe>https://groups.google.com/forum/#!forum/neo4j</subscribe>
    </mailingList>
  </mailingLists>

  <issueManagement>
    <url>https://github.com/neo4j/docs-maven-plugin</url>
  </issueManagement>

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

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-filtering</artifactId>
    </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interpolation</artifactId>
      </dependency>
    <dependency>
      <groupId>org.twdata.maven</groupId>
      <artifactId>mojo-executor</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-java-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>default-jar</id>
            <configuration>
              <archive>
                <manifest>
                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                </manifest>
                <manifestEntries>
                  <Url>${project.organization.url}</Url>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <detectJavaApiLink>true</detectJavaApiLink>
          <detectLinks>true</detectLinks>
          <detectOfflineLinks>false</detectOfflineLinks>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <!-- get rid of execution from sonatype parent -->
            <id>attach-javadocs</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>attach-javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-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/**/*.xml</include>
          </includes>
          <properties>
            <inceptionYear>${project.inceptionYear}</inceptionYear>
            <currentYear>${currentYear}</currentYear>
          </properties>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <reportPlugins>
            <plugin>
              <artifactId>maven-project-info-reports-plugin</artifactId>
              <configuration>
                <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
              </configuration>
              <reportSets>
                <reportSet>
                  <reports>
                    <report>index</report>
                    <report>dependencies</report>
                    <report>plugins</report>
                    <report>mailing-list</report>
                    <report>license</report>
                    <report>summary</report>
                  </reports>
                </reportSet>
              </reportSets>
            </plugin>
            <plugin>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <detectJavaApiLink>true</detectJavaApiLink>
                <detectLinks>true</detectLinks>
                <detectOfflineLinks>false</detectOfflineLinks>
                <quiet>true</quiet>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-plugin-plugin</artifactId>
              <version>2.9</version>
            </plugin>
          </reportPlugins>
        </configuration>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
         <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.4</version>
          <configuration>
            <keyname>Neo Technology Build Server</keyname>
            <useAgent>true</useAgent>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.0</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-core</artifactId>
              <version>1.2</version>
            </dependency>
            <dependency>
              <groupId>${skinGroupId}</groupId>
              <artifactId>${skinArtifactId}</artifactId>
              <version>${skinVersion}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.11</version>
        </plugin>
        <!--  non org.apache.maven.plugins -->
        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>1.9.0</version>
        </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>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <versionRange>[1.9.0,)</versionRange>
                    <goals>
                      <goal>check</goal>
                      <goal>format</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <versionRange>[2.7,)</versionRange>
                    <goals>
                      <goal>javadoc</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.twdata.maven</groupId>
        <artifactId>mojo-executor</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.shared</groupId>
        <artifactId>maven-filtering</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-archiver</artifactId>
        <version>2.1</version>
      </dependency>
      <!-- testing -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.9</version>
        <scope>test</scope>
      </dependency>
      <!-- lock down versions -->
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interpolation</artifactId>
        <version>1.14</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.0</version>
      </dependency>
      <dependency>
        <groupId>org.sonatype.aether</groupId>
        <artifactId>aether-api</artifactId>
        <version>1.13.1</version>
      </dependency>
      <dependency>
        <groupId>org.sonatype.sisu</groupId>
        <artifactId>sisu-inject-plexus</artifactId>
        <version>2.3.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-repository-metadata</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>3.0-alpha-2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-monitor</artifactId>
        <version>2.2.1</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-container-default</artifactId>
        <version>1.5.5</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-classworlds</artifactId>
        <version>2.4</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-annotations</artifactId>
        <version>1.5.5</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>enable-docs-plugin-dogfooding</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
            <name>dogfood</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>docs-maven-plugin</artifactId>
            <groupId>org.neo4j.build.plugins</groupId>
            <version>${project.version}</version>
            <executions>
              <execution>
                <id>assemble-docs</id>
                <goals><goal>assemble</goal></goals>
              </execution>
            </executions>
            <!--
            NOTE: configure the plugin, not the execution;
              otherwise it won't get picked up by CLI exection.
            <configuration>
              <sourceDirectories>
                <sourceDirectory>${basedir}/src/docs</sourceDirectory>
                <sourceDirectory>${project.build.directory}/docs</sourceDirectory>
              </sourceDirectories>
            </configuration>
            -->
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>enable-docs-plugin--fulldogfooding</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
            <name>dogfood2</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack-docs</id>
                <phase>package</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>docs</classifier>
                  <includeClassifiers>docs</includeClassifiers>
                  <excludeTransitive>true</excludeTransitive>
                  <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
                  <stripVersion>true</stripVersion>
                  <excludes>META-INF,META-INF/**</excludes>
                  <type>jar</type>
                  <outputDirectory>target/test-unpacking</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <artifactId>docs-maven-plugin</artifactId>
          <groupId>org.neo4j.build.plugins</groupId>
          <version>${project.version}</version>
          <classifier>docs</classifier>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>  

  <distributionManagement>
    <snapshotRepository>
      <id>snapshots@repo.neo4j.org</id>
      <name>snapshots@repo.neo4j.org</name>
      <uniqueVersion>false</uniqueVersion>
      <url>https://repo.neo4j.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <site>
      <id>neo4j-site</id>
      <url>scpexe://components.neo4j.org/home/neo/components/${project.artifactId}/${project.version}</url>
    </site>
  </distributionManagement>

</project>

