<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>lt.velykis.maven.skins</groupId>
  <artifactId>reflow-parent</artifactId>
  <version>1.1.1</version>
  <packaging>pom</packaging>

  <name>Reflow Maven Skin Parent</name>
  <description>Reflow Maven skin and supporting libraries parent</description>
  <inceptionYear>2012</inceptionYear>
  
  <modules>
    <module>reflow-velocity-tools</module>
    <module>reflow-maven-skin</module>
  </modules>

  <properties>
    <site.url>http://andriusvelykis.github.io/reflow-maven-skin</site.url>
    <github.global.server>github</github.global.server>
    <site.deploy.id>gh-pages</site.deploy.id>
    <site.deploy.url />

    <repositoryName>reflow-maven-skin</repositoryName>
    <repositoryOwner>andriusvelykis</repositoryOwner>
  </properties>

  <url>${site.url}</url>

  <scm>
    <connection>scm:git:git@github.com:andriusvelykis/reflow-maven-skin.git</connection>
    <developerConnection>scm:git:git@github.com:andriusvelykis/reflow-maven-skin.git</developerConnection>
    <url>http://github.com/andriusvelykis/reflow-maven-skin/tree/master</url>
    <tag>reflow-parent-1.1.1</tag>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>http://github.com/andriusvelykis/reflow-maven-skin/issues</url>
  </issueManagement>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Andrius Velykis</name>
    <url>http://andrius.velykis.lt</url>
  </organization>

  <developers>
    <developer>
      <id>andriusvelykis</id>
      <name>Andrius Velykis</name>
      <timezone>0</timezone>
      <url>http://andrius.velykis.lt</url>
    </developer>
  </developers>

  <build>
    <plugins>
      <!-- Configure Maven site plugin for Reflow skin and Markdown support -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.3</version>
        <dependencies>
          <dependency>
            <groupId>lt.velykis.maven.skins</groupId>
            <artifactId>reflow-velocity-tools</artifactId>
            <version>1.1.1</version>
          </dependency>
          <dependency>
            <!-- Reflow skin requires velocity 1.7 -->
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
          </dependency>
        </dependencies>
        <configuration>
          <generateReports>true</generateReports>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
          <!-- Site deployment done using GitHub site plugin -->
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>

      <plugin>
        <!-- GitHub site plug-in for deployment to GitHub pages -->
        <groupId>com.github.github</groupId>
        <artifactId>site-maven-plugin</artifactId>
        <version>0.9</version>
        <configuration>
          <message>Creating site for ${project.artifactId}, ${project.version}</message>
          <!-- this does the trick to place every module in the correct subfolder -->
          <path>${project.distributionManagement.site.url}</path>
          <merge>true</merge>
        </configuration>
        <executions>
          <execution>
            <id>github-site</id>
            <goals>
              <goal>site</goal>
            </goals>
            <phase>site-deploy</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
        </configuration>
         <dependencies>
            <dependency>
               <groupId>org.apache.maven.scm</groupId>
               <artifactId>maven-scm-provider-gitexe</artifactId>
               <!-- This version is necessary for use with git version 1.8.5 -->
               <version>1.8.1</version>
            </dependency>
         </dependencies>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <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>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <anonymousConnection>scm:git:git@github.com:andriusvelykis/reflow-maven-skin.git</anonymousConnection>
          <developerConnection>scm:git:git@github.com:andriusvelykis/reflow-maven-skin.git</developerConnection>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>summary</report>
              <report>license</report>
              <report>modules</report>
              <report>project-team</report>
              <report>scm</report>
              <report>issue-tracking</report>
              <report>dependencies</report>
              <report>dependency-convergence</report>
              <report>plugins</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <includeOpenIssues>false</includeOpenIssues>
          <columnNames>Id,Type,Summary,Fix Version</columnNames>
        </configuration>
        <reportSets>
          <reportSet>
            <!-- Empty report set as default -->
            <reports>
            </reports>
          </reportSet>
          <reportSet>
            <id>release-notes</id>
            <inherited>false</inherited>
            <reports>
              <report>github-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <distributionManagement>
    <site>
      <id>${site.deploy.id}</id>
      <name>Deployment through GitHub's site deployment plugin</name>
      <url>${site.deploy.url}</url>
    </site>
  </distributionManagement>

  <profiles>
    <profile>
      <id>stage</id>
      <properties>
        <site.deploy.url>http://github.com/andriusvelykis/reflow-maven-skin/tree/gh-pages/</site.deploy.url>
      </properties>

      <build>
        <plugins>
          <!-- Configure Maven site plugin to perform stage -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.3</version>
            <executions>
              <execution>
                <id>stage</id>
                <goals>
                  <goal>stage</goal>
                </goals>
                <phase>site</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

    </profile>
  </profiles>

</project>
