<?xml version="1.0" encoding="UTF-8" ?>

<!--
  - Author: tlerios@marketcetera.com
  - Since: 0.5.0
  - Version: $Id: pom.xml 16937 2014-09-13 00:33:09Z colin $
  - $License$
  -->

<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>org.marketcetera</groupId>
      <artifactId>public-parent</artifactId>
      <version>2.4.1</version>
  </parent>
  <artifactId>util</artifactId>
  <packaging>jar</packaging>

  <name>Utilities</name>

  <dependencies>

    <!-- Compile. -->
    <dependency>
      <groupId>quickfixj</groupId>
      <artifactId>quickfixj-all</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-i18n</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.googlecode.protobuf-rpc-pro</groupId>
      <artifactId>protobuf-streamer-pro</artifactId>
    </dependency>
    <dependency>
      <groupId>com.googlecode.protobuf-rpc-pro</groupId>
      <artifactId>protobuf-rpc-pro-duplex</artifactId>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty</artifactId>
    </dependency>
    <dependency>
      <groupId>com.jcraft</groupId>
      <artifactId>jzlib</artifactId>
    </dependency>

    <!-- Runtime. -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
      <scope>runtime</scope>
    </dependency>

    <!-- Testing. -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>util-test</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http-jetty</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <!-- Configure Eclipse IDE metadata. -->
      <plugin>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <pde>true</pde>
          <manifest>null</manifest>
          <resolveDependencies>false</resolveDependencies>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>

    <!-- Command-line execution: test. -->
    <profile>
      <id>ws.server</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>org.marketcetera.util.ws.sample.SampleServer</mainClass>
              <!-- -Dexec.args="-user user -password password -longGreeting" -->
              <classpathScope>test</classpathScope>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Command-line execution: test. -->
    <profile>
      <id>ws.client</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>org.marketcetera.util.ws.sample.SampleClient</mainClass>
              <!--
                - -Dexec.args="-user user -password password -argument World"
                - Try 'badPassword' for password.
                - Try 'World', 'I18NException', 'AssertionError',
                -  'IllegalArgumentException' for argument.
                - Try non-default locale '-language fr -country CA'.
                -->
              <classpathScope>test</classpathScope>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Command-line execution: test. -->
    <profile>
      <id>setter.context</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>org.marketcetera.util.auth.SetterContextConsoleTest</mainClass>
              <classpathScope>test</classpathScope>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Command-line execution: test. -->
    <profile>
      <id>standard.authentication</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>org.marketcetera.util.auth.StandardAuthenticationTest</mainClass>
              <!-- -Dexec.args="-p pass" or omit altogether. -->
              <classpathScope>test</classpathScope>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
