com.xebialabs.deployit.test.support.onthefly
Class EarOnTheFly
java.lang.Object
com.xebialabs.deployit.test.support.onthefly.JarOnTheFly
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EarOnTheFly
public EarOnTheFly(java.lang.String name)
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 © 2010. All Rights Reserved.