<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Apache BookKeeper :: Server
  %%
  Copyright (C) 2011 - 2017 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>bookkeeper</artifactId>
    <groupId>org.apache.bookkeeper</groupId>
    <version>4.5.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>bookkeeper-server</artifactId>
  <name>Apache BookKeeper :: Server</name>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.2.0</version>
        <extensions>true</extensions>
        <inherited>true</inherited>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4.3</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <artifactSet>
                <includes>
                  <include>com.google.protobuf:protobuf-java</include>
                  <include>com.google.guava:guava</include>
                </includes>
              </artifactSet>
              <minimizeJar>true</minimizeJar>
              <relocations>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>bk-shade.com.google.proto_${protobuf.version}</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>bk-shade.com.google</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
        <configuration />
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.6</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>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>../src/assemble/bin.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/DataFormats.java</exclude>
            <exclude>**/BookkeeperProtocol.java</exclude>
            <exclude>**/target/**/*</exclude>
            <exclude>**/.classpath</exclude>
            <exclude>**/.gitignore</exclude>
            <exclude>**/.project</exclude>
            <exclude>**/.settings/*</exclude>
            <exclude>certs/keyStoreClientPassword.txt</exclude>
            <exclude>certs/keyStoreServerPassword.txt</exclude>
            <exclude>certs/trustStorePassword.txt</exclude>
            <exclude>src/test/resources/cacerts</exclude>
            <exclude>src/test/resources/keyStoreClientPassword.txt</exclude>
            <exclude>src/test/resources/keyStoreServerPassword.txt</exclude>
            <exclude>src/test/resources/trustStorePassword.txt</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.libdir}</outputDirectory>
              <includeScope>runtime</includeScope>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>${project.libdir}</directory>
              <followSymlinks>false</followSymlinks>
            </fileset>
            <fileset>
              <directory>${project.basedir}</directory>
              <includes>
                <include>dependency-reduced-pom.xml</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>protobuf</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>default-cli</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <exec>
                      <arg />
                      <arg />
                    </exec>
                    <exec>
                      <arg />
                      <arg />
                    </exec>
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>twitter-science-provider</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.bookkeeper.stats</groupId>
          <artifactId>twitter-science-provider</artifactId>
          <version>${project.parent.version}</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>codahale-metrics-provider</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.bookkeeper.stats</groupId>
          <artifactId>codahale-metrics-provider</artifactId>
          <version>${project.parent.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.bookkeeper.stats</groupId>
      <artifactId>bookkeeper-stats-api</artifactId>
      <version>4.5.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.25</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.25</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
      <version>3.5.3-beta</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>javacc</artifactId>
          <groupId>net.java.dev.javacc</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
      <version>3.5.3-beta</version>
      <type>test-jar</type>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.3.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-configuration</groupId>
      <artifactId>commons-configuration</artifactId>
      <version>1.6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>3.2.7</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>mail</artifactId>
          <groupId>javax.mail</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jms</artifactId>
          <groupId>javax.jms</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jmxtools</artifactId>
          <groupId>com.sun.jdmk</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jmxri</artifactId>
          <groupId>com.sun.jmx</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.bookkeeper</groupId>
      <artifactId>bookkeeper-server-compat400</artifactId>
      <version>4.5.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>bookkeeper-server</artifactId>
          <groupId>org.apache.bookkeeper</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.bookkeeper</groupId>
      <artifactId>bookkeeper-server-compat410</artifactId>
      <version>4.5.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>bookkeeper-server</artifactId>
          <groupId>org.apache.bookkeeper</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.bookkeeper</groupId>
      <artifactId>bookkeeper-server-compat420</artifactId>
      <version>4.5.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>bookkeeper-server</artifactId>
          <groupId>org.apache.bookkeeper</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-all</artifactId>
      <version>4.1.12.Final</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-minikdc</artifactId>
      <version>2.7.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>apacheds-core-api</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-interceptor-kerberos</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-protocol-shared</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-protocol-kerberos</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-ldif-partition</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-mavibot-partition</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>api-all</artifactId>
          <groupId>org.apache.directory.api</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-jdbm-partition</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apacheds-protocol-ldap</artifactId>
          <groupId>org.apache.directory.server</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-tcnative-boringssl-static</artifactId>
      <version>2.0.3.Final</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <project.libdir>${basedir}/lib</project.libdir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>

