com.xebialabs.deployit.test.support.onthefly
Class EarOnTheFly

java.lang.Object
  extended by com.xebialabs.deployit.test.support.onthefly.JarOnTheFly
      extended by com.xebialabs.deployit.test.support.onthefly.EarOnTheFly

public class EarOnTheFly
extends JarOnTheFly

Constructs an EAR for testing, accepting multiple WARs as entries. The context root for a WAR in the EAR is its name. The actual EAR file is finally written to a temporary directory. Example:

 EarOnTheFly earOnTheFly = new EarOnTheFly("myEar");
 earOnTheFly.addFile("foo", someFile);
 earOnTheFly.addFile("bar", someResource);
 ...
 WarOnTheFly warOnTheFly = new WarOnTheFly("myWar");
 warOnTheFly.addServlet(FooServlet.class);
 ...
 earOnTheFly.addWarOnTheFly(warOnTheFly); // will have context root http://myhost:myport/myWar
 ...
 File ear = earOnTheFly.writeToTemporaryFile(); // something like myEarXX.ear
 
See also " Middleware integration testing with JUnit, Maven and VMware: part 2".

See Also:
WarOnTheFly, JarOnTheFly

Constructor Summary
EarOnTheFly(java.lang.String name)
           
 
Method Summary
 void addWarOnTheFly(WarOnTheFly wotf)
           
 java.lang.String getName()
           
 java.io.File writeToTemporaryFile()
           
 
Methods inherited from class com.xebialabs.deployit.test.support.onthefly.JarOnTheFly
addFile, write, writeToTemporaryFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EarOnTheFly

public EarOnTheFly(java.lang.String name)
Method Detail

addWarOnTheFly

public void addWarOnTheFly(WarOnTheFly wotf)
                    throws java.io.IOException
Throws:
java.io.IOException

writeToTemporaryFile

public java.io.File writeToTemporaryFile()
                                  throws java.io.IOException
Throws:
java.io.IOException

getName

public java.lang.String getName()


Copyright © 2009. All Rights Reserved.