<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>net.dempsy</groupId>
    <artifactId>dempsy-commons</artifactId>
    <version>2.0.0</version>
    <relativePath>../dempsy-commons-parentpom/pom.xml</relativePath>
  </parent>

  <artifactId>dempsy-distconfig.main</artifactId>
  <name>dempsy-distconfig spring configurable main application</name>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <dependencies>
    <dependency>
      <groupId>net.dempsy</groupId>
      <artifactId>dempsy-distconfig.api</artifactId>
    </dependency>
    <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>slf4j-log4j12</artifactId>
     <scope>runtime</scope>
    </dependency>

    <!-- Runtime dependencies -->
    <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>slf4j-log4j12</artifactId>
     <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.dempsy</groupId>
      <artifactId>dempsy-cluster.zookeeper</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.dempsy</groupId>
      <artifactId>dempsy-serialization.jackson</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.dempsy</groupId>
      <artifactId>dempsy-distconfig.clusterinfo</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.dempsy</groupId>
      <artifactId>dempsy-distconfig.apachevfs</artifactId>
      <scope>runtime</scope>
    </dependency>

    <!-- Testing  -->
    <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <scope>test</scope>
    </dependency>
    <dependency>
     <groupId>net.dempsy</groupId> <!-- used in testing disconf functionality -->
     <artifactId>dempsy-cluster.zookeeper</artifactId>
     <type>test-jar</type>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <createDependencyReducedPom>false</createDependencyReducedPom>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>net.dempsy.distconfig.Config</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      </plugins>
      </build>
</project>
