<?xml version="1.0" encoding="UTF-8"?>
<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">
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.tomdz.maven</groupId>
  <artifactId>sphinx-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <version>1.0.3</version>
  <url>http://www.tomdz.org</url>
  <name>sphinx-maven</name>
  <description>Maven plugin that creates the site with Sphinx</description>
  <licenses>
    <license>
      <name>BSD License</name>
      <url>http://www.opensource.org/licenses/bsd-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>tomdz</id>
      <name>Thomas Dudziak</name>
      <url>https://github.com/tomdz</url>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/tomdz/sphinx-maven.git</connection>
    <developerConnection>scm:git:git@github.com:tomdz/sphinx-maven.git</developerConnection>
    <url>http://github.com/tomdz/sphinx-maven/tree/master</url>
    <tag>sphinx-maven-plugin-1.0.3</tag>
  </scm>
  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>http://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>

    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>3.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>2.0.5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-descriptor</artifactId>
      <version>2.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.python</groupId>
      <artifactId>jython-standalone</artifactId>
      <version>2.5.2</version>
    </dependency>
  </dependencies>
  <prerequisites>
    <maven>2.2.1</maven>
  </prerequisites>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.1.1</version>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.2.1</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>1.6</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <encoding>UTF-8</encoding>
          <maxmem>1024m</maxmem>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.3.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.8</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>org.jython:jython-standalone</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <source>1.6</source>
          <encoding>UTF-8</encoding>
          <maxmemory>1g</maxmemory>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <tags>
            <tag>
              <name>goal</name>
              <placement>a</placement>
              <head>Maven goal</head>
            </tag>
            <tag>
              <name>phase</name>
              <placement>a</placement>
              <head>Maven phase</head>
            </tag>
          </tags>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <attach>true</attach>
        </configuration>
        <executions>
          <execution>
            <id>create-source-jar</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.github</groupId>
        <artifactId>site-maven-plugin</artifactId>
        <version>0.7</version>
        <configuration>
          <message>Building site for ${project.version}</message>
          <noJekyll>true</noJekyll>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>site</goal>
            </goals>
            <phase>site</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.4</version>
        <reportSets>
          <reportSet>
            <reports />
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <source>1.6</source>
          <encoding>UTF-8</encoding>
          <maxmemory>1g</maxmemory>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <tags>
            <tag>
              <name>goal</name>
              <placement>a</placement>
              <head>Maven goal</head>
            </tag>
            <tag>
              <name>phase</name>
              <placement>a</placement>
              <head>Maven phase</head>
            </tag>
          </tags>
          <stylesheetfile>src/site/javadoc/stylesheet.css</stylesheetfile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.tomdz.maven</groupId>
        <artifactId>sphinx-maven-plugin</artifactId>
        <version>1.0.3</version>
        <reportSets>
          <reportSet>
            <reports><report>generate</report></reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>maven-3</id>
      <activation>
        <file>
          <!--  This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <exists>${basedir}</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.0</version>
            <configuration>
              <reportPlugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-project-info-reports-plugin</artifactId>
                  <version>2.4</version>
                  <reportSets>
                    <reportSet>
                      <reports />
                    </reportSet>
                  </reportSets>
                </plugin>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.9</version>
                  <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
                    <maxmemory>1g</maxmemory>
                    <links>
                      <link>http://java.sun.com/javase/6/docs/api/</link>
                    </links>
                    <tags>
                      <tag>
                        <name>goal</name>
                        <placement>a</placement>
                        <head>Maven goal</head>
                      </tag>
                      <tag>
                        <name>phase</name>
                        <placement>a</placement>
                        <head>Maven phase</head>
                      </tag>
                    </tags>
                    <stylesheetfile>src/site/javadoc/stylesheet.css</stylesheetfile>
                  </configuration>
                </plugin>
                <plugin>
                  <groupId>org.tomdz.maven</groupId>
                  <artifactId>sphinx-maven-plugin</artifactId>
                  <version>${project.version}</version>
                </plugin>
              </reportPlugins>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>standalone-docs</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.tomdz.maven</groupId>
            <artifactId>sphinx-maven-plugin</artifactId>
            <version>${project.version}</version>
            <executions>
              <execution>
                <id>standalone-html-docs</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <builder>html</builder>
                  <outputDirectory>${project.build.directory}/docs</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>standalone-pdf-docs</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <builder>pdf</builder>
                  <outputDirectory>${project.build.directory}/docs-pdf</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
