org.codehaus.cargo.sample.java
Class EnvironmentTestData

java.lang.Object
  extended by org.codehaus.cargo.sample.java.EnvironmentTestData

public class EnvironmentTestData
extends Object

Groups together all environmental test datat (ie data that depends on how the user has configured its tests to run in Maven).

Version:
$Id: EnvironmentTestData.java 1830 2008-12-07 20:44:33Z adriancole $

Field Summary
 String containerId
          Name of container to run (this is the container ID, see Container.getId().
 long containerTimeout
          Timeout to test if a container is correctly started or stopped.
 ContainerType containerType
          The container type (local, remote, etc)
 String home
          Home for the already installed container (in that case installDir and installURL are ignored).
 String installDir
          Location where to put the zipped distributions and where to unpack them.
 URL installURL
          URL where the zipped container is located.
 String javaHome
          Java Home used to start the container.
 int port
          Port on which to start the web container.
 Proxy proxy
          Proxy properties if defined (can be null).
 String targetDir
          Target directory where build results are stored and where container execution will happen.
 String version
          Version of Cargo being built (this is required to compute the exact location of the test data files in the local Maven repository)
 
Constructor Summary
EnvironmentTestData(String containerId, ContainerType containerType, String targetDirSuffix)
           
 
Method Summary
 String getTestDataFileFor(String artifactName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

containerId

public String containerId
Name of container to run (this is the container ID, see Container.getId(). We use it guess the XML name of the Ant task.


containerType

public ContainerType containerType
The container type (local, remote, etc)


installURL

public URL installURL
URL where the zipped container is located.


installDir

public String installDir
Location where to put the zipped distributions and where to unpack them.


port

public int port
Port on which to start the web container.


containerTimeout

public long containerTimeout
Timeout to test if a container is correctly started or stopped.


targetDir

public String targetDir
Target directory where build results are stored and where container execution will happen.


home

public String home
Home for the already installed container (in that case installDir and installURL are ignored).


javaHome

public String javaHome
Java Home used to start the container.


version

public String version
Version of Cargo being built (this is required to compute the exact location of the test data files in the local Maven repository)


proxy

public Proxy proxy
Proxy properties if defined (can be null).

Constructor Detail

EnvironmentTestData

public EnvironmentTestData(String containerId,
                           ContainerType containerType,
                           String targetDirSuffix)
Parameters:
containerId - the container's name (eg "resin3x")
containerType - the container's type
targetDirSuffix - relative directory from the base target dir where to put test-generated files
Method Detail

getTestDataFileFor

public String getTestDataFileFor(String artifactName)
Parameters:
artifactName - the artifact for which to return the location (eg "simple-war").
Returns:
the location of the artifact as a string


Copyright © 2004-2012 Codehaus. All Rights Reserved.