<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>com.projectdarkstar.example.request</groupId>
    <artifactId>request</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <artifactId>request-client</artifactId>
  <name>Request Example Client</name>
  <packaging>jar</packaging>
  <description>
    Client module for the Project Darkstar request example.
  </description>

  <dependencies>
    <!-- Compile time dependencies -->
    <dependency>
      <groupId>com.projectdarkstar.client</groupId>
      <artifactId>sgs-client-api</artifactId>
    </dependency>

    <!-- Runtime dependencies -->
    <dependency>
      <groupId>com.projectdarkstar.client</groupId>
      <artifactId>sgs-client</artifactId>
    </dependency>
  </dependencies>


  <profiles>


    <!-- The run-client profile enables the antrun plugin
	 to run the application in the process-test-resources
	 phase of the lifecycle
	 In order to run, use the following command:
	 mvn process-test-resources -Prun-client -->
    <profile>
      <id>run-client</id>
      <build>
	<plugins>
	  <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
	    <executions>
	      <execution>
		<id>run-client</id>
		<phase>process-test-resources</phase>
		<goals>
		  <goal>run</goal>
		</goals>
		<configuration>
		  <tasks>
		    <java classname="com.sun.sgs.example.request.client.WandererClient"
			  fork="true">
		      <jvmarg line="${jvm.args} ${jvm.args.extra}"/>
		      <sysproperty key="java.util.logging.config.file"
				   file="${logging.properties}"/>
		      <sysproperty key="com.sun.sgs.example.request.client.wanderer.host"
				   value="${wanderer.host}"/>
		      <sysproperty key="com.sun.sgs.example.request.client.wanderer.clients"
				   value="${wanderer.clients}"/>
		      <classpath>
			<path refid="maven.test.classpath"/>
		      </classpath>
		    </java>
		  </tasks>
		</configuration>
	      </execution>
	    </executions>
	  </plugin>
	</plugins>
      </build>
    </profile>

  </profiles>

  <properties>
    <jvm.args></jvm.args>
    <jvm.args.extra></jvm.args.extra>
    <logging.properties>${basedir}/src/test/properties/logging.properties</logging.properties>
    <wanderer.host>localhost</wanderer.host>
    <wanderer.clients>10</wanderer.clients>
  </properties>


</project>
