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

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <codehaus.jackson.version>1.9.13</codehaus.jackson.version>
    <google.guava.version>14.0</google.guava.version>
    <junit.version>4.11</junit.version>
  </properties>

  <name>Comoyo Commons Multi-Module POM</name>
  <groupId>com.comoyo</groupId>
  <artifactId>commons</artifactId>
  <version>1.4.56</version>
  <description>Collection of utility components</description>

  <url>https://github.com/comoyo/commons</url>
  <packaging>pom</packaging>

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

  <scm>
    <url>
      https://github.com/comoyo/commons
    </url>
    <developerConnection>
      scm:git:ssh://git@github.com/comoyo/commons
    </developerConnection>
    <connection>
      scm:git:ssh://git@github.com/comoyo/commons
    </connection>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <developers>
    <developer>
      <id>argggh</id>
      <name>Arne Georg Gleditsch</name>
      <email>argggh@comoyo.com</email>
      <url>https://github.com/argggh</url>
    </developer>
    <developer>
      <id>bung</id>
      <name>Mikael Bung</name>
      <email>mikael@comoyo.com</email>
      <url>https://github.com/phyrex1an</url>
    </developer>
  </developers>

  <modules>
    <module>pb-json</module>
    <module>protoc-bundled-plugin</module>
    <module>amazonaws-utils</module>
    <module>logging-context</module>
    <module>logging-context-gelf</module>
    <module>logging-context-json</module>
    <module>logging-utilities</module>
    <module>emjar</module>
    <module>emjar-maven-plugin</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>2.1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbose>false</verbose>
          <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
          <gitDescribe><tags>true</tags></gitDescribe>
          <skipPomProjects>true</skipPomProjects>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.8</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.1</version>
        <inherited>false</inherited>
        <configuration>
          <newVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${buildNum}</newVersion>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.9</version>
        <configuration>
          <message>Cut REL-${project.version}</message>
          <tag>REL-${project.version}</tag>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
	    <configuration>
              <additionalparam>${javadoc.opts}</additionalparam>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <show>package</show>
          <quiet>true</quiet>
          <offlineLinks>
            <offlineLink>
              <url>https://javaee-spec.java.net/nonav/javadocs</url>
              <location>../../../javadoc/javaee-spec.java.net</location>
            </offlineLink>
            <offlineLink>
              <url>https://developers.google.com/protocol-buffers/docs/reference/java</url>
              <location>../../../javadoc/developers.google.com/protocol-buffers</location>
            </offlineLink>
            <offlineLink>
              <url>https://jersey.java.net/nonav/apidocs/1.18/jersey</url>
              <location>../../../javadoc/jersey.java.net</location>
            </offlineLink>
            <offlineLink>
              <url>http://jackson.codehaus.org/1.9.9/javadoc</url>
              <location>../../../javadoc/jackson.codehaus.org</location>
            </offlineLink>
            <offlineLink>
              <url>http://docs.guava-libraries.googlecode.com/git/javadoc</url>
              <location>../../../javadoc/docs.guava-libraries.googlecode.com</location>
            </offlineLink>
            <offlineLink>
              <url>http://logging.paluch.biz/apidocs</url>
              <location>../../../javadoc/logging.paluch.biz</location>
            </offlineLink>
            <offlineLink>
              <url>http://maven.apache.org/ref/3.0.5/maven-artifact/apidocs</url>
              <location>../../../javadoc/maven.apache.org/maven-artifact</location>
            </offlineLink>
          </offlineLinks>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>doclint-java8-disable</id>
      <activation>
	<jdk>[1.8,)</jdk>
      </activation>
      <properties>
	<javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
    </profile>
  </profiles>
</project>
