<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>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>org.onosproject</groupId>
  <artifactId>copycat-parent</artifactId>
  <version>0.3.0.onos</version>
  <packaging>pom</packaging>
  <name>CopyCat</name>
  <description>Replicated state machine framework based on the Raft consensus algorithm.</description>
  <url>http://github.com/kuujo/copycat</url>
  <inceptionYear>2013</inceptionYear>

  <properties>
    <slf4j.version>1.7.7</slf4j.version>
    <logback.version>1.1.2</logback.version>

    <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
    <maven.compiler.plugin.version>3.0</maven.compiler.plugin.version>
    <maven.failsafe.plugin.version>2.14</maven.failsafe.plugin.version>
    <maven.clean.plugin.version>2.5</maven.clean.plugin.version>
    <maven.resources.plugin.version>2.6</maven.resources.plugin.version>
    <maven.dependency.plugin.version>2.7</maven.dependency.plugin.version>
    <maven.assembly.plugin.version>2.4</maven.assembly.plugin.version>
    <maven.javadoc.plugin.version>2.8.1</maven.javadoc.plugin.version>
  </properties>

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

  <developers>
    <developer>
      <name>Jordan Halterman</name>
      <url>https://www.github.com/kuujo</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:kuujo/copycat.git</connection>
    <developerConnection>scm:git:git@github.com:kuujo/copycat.git</developerConnection>
    <url>git@github.com:kuujo/copycat.git</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>http://github.com/kuujo/copycat/issues</url>
  </issueManagement>

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

  <modules>
    <module>core</module>
    <module>tcp</module>
<!--
    <module>http</module>
    <module>netty</module>
    <module>vertx</module>
    <module>vertx3</module>
    <module>chronicle</module>
    <module>examples</module>
-->
  </modules>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.8.8</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.jodah</groupId>
      <artifactId>concurrentunit</artifactId>
      <version>0.3.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven.source.plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.plugin.version}</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.1</version><!--$NO-MVN-MAN-VER$ -->
        <configuration>
          <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <!--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>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[2.7,)</versionRange>
                    <goals>
                      <goal>copy-dependencies</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>javadoc</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven.javadoc.plugin.version}</version>
            <configuration>
              <show>public</show>
              <excludePackageNames>*.internal.*</excludePackageNames>
              <reportOutputDirectory>docs</reportOutputDirectory>
              <destDir>java</destDir>
            </configuration>
            <executions>
              <execution>
                <id>javadoc-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
