<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Apache Ratis Examples
  %%
  Copyright (C) 2017 - 2018 The Apache Software Foundation
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->

<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">
  <parent>
    <artifactId>ratis</artifactId>
    <groupId>org.apache.ratis</groupId>
    <version>0.2.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>ratis-examples</artifactId>
  <name>Apache Ratis Examples</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>*.jar</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer>
                  <mainClass>org.apache.ratis.examples.arithmetic.Runner</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.10</version>
        <executions>
          <execution>
            <id>update-pom-license</id>
            <phase>package</phase>
            <goals>
              <goal>update-file-header</goal>
            </goals>
            <configuration>
              <licenseName>apache_v2</licenseName>
              <includes>
                <include>dependency-reduced-pom.xml</include>
              </includes>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <canUpdateCopyright>false</canUpdateCopyright>
          <roots>
            <root>${project.basedir}</root>
          </roots>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>clean-shade</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>default-clean</id>
                <phase>clean</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
              </execution>
              <execution>
                <id>shaded-clean</id>
                <phase>clean</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
                <configuration>
                  <filesets>
                    <fileset>
                      <directory>.</directory>
                      <includes>
                        <include>dependency-reduced-pom.xml</include>
                      </includes>
                      <followSymlinks>false</followSymlinks>
                    </fileset>
                  </filesets>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <os.detected.release.like.arch>true</os.detected.release.like.arch>
        <os.detected.release>arch</os.detected.release>
        <os.detected.name>linux</os.detected.name>
        <os.detected.classifier>linux-x86_64</os.detected.classifier>
        <os.detected.arch>x86_64</os.detected.arch>
        <os.detected.release.like.archlinux>true</os.detected.release.like.archlinux>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-common</artifactId>
      <version>0.2.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-client</artifactId>
      <version>0.2.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-server</artifactId>
      <version>0.2.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-hadoop</artifactId>
      <version>0.2.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-hadoop</artifactId>
      <version>0.2.0</version>
      <type>test-jar</type>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-hadoop-shaded</artifactId>
      <version>0.2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-grpc</artifactId>
      <version>0.2.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ratis</groupId>
      <artifactId>ratis-netty</artifactId>
      <version>0.2.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.8.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

