<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.github.jinahya</groupId>
    <artifactId>ossrh-parent</artifactId>
    <version>0.8.5</version>
  </parent>

  <groupId>com.github.jinahya</groupId>
  <artifactId>jinahya-parent</artifactId>
  <version>0.7.6</version>
  <packaging>pom</packaging>

  <name>${project.artifactId}</name>
  <description>parent pom for jinahya</description>
  <url>https://github.com/jinahya/${project.artifactId}</url>

  <scm>
    <connection>scm:git:git@github.com:jinahya/${project.artifactId}.git</connection>
    <developerConnection>scm:git:git@github.com:jinahya/${project.artifactId}.git</developerConnection>
    <url>https://github.com/jinahya/${project.artifactId}.git</url>
    <tag>0.7.6</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.github.github</groupId>
          <artifactId>site-maven-plugin</artifactId>
          <version>0.12</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
          <goals>install</goals>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>umlgraph</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>${maven-javadoc-plugin.version}</version>
              <configuration>
                <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
                <docletArtifact>
                  <groupId>org.umlgraph</groupId>
                  <artifactId>umlgraph</artifactId>
                  <version>5.6.6</version>
                </docletArtifact>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>ghsite</id>
      <distributionManagement>
        <site>
          <id>jinahy.github.io</id>
          <url>https://jinahya.github.io/${project.artifactId}/sites/${project.version}/</url>
        </site>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <configuration>
              <server>github</server>
              <message>creating site for ${project.version}</message>
              <path>sites/${project.version}</path>
              <merge>true</merge>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>site</goal>
                </goals>
                <phase>site</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile> 
    <profile>
      <id>submodule</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.6.0</version>
            <executions>
              <execution>
                <id>git-submodule-update</id>
                <goals>
                  <goal>exec</goal>
                </goals>
                <phase>initialize</phase>
                <configuration>
                  <executable>git</executable>
                  <arguments>
                    <argument>submodule</argument>
                    <argument>update</argument>
                    <argument>--init</argument>
                    <argument>--recursive</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>        
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
