Class Deployments
java.lang.Object
org.wildfly.testing.tools.deployment.Deployments
Utility class for creating ShrinkWrap archives with conventional naming.
This is particularly useful when building complex deployments like EARs that contain multiple modules:
@GenerateDeployment(DeploymentType.EAR)
public static void deployment(EnterpriseArchive ear) {
ear.addAsModule(Deployments.war("myapp")
.addClasses(MyServlet.class));
ear.addAsLibrary(Deployments.jar("mylib")
.addClasses(MyLibrary.class));
}
- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.shrinkwrap.api.spec.JavaArchiveCreates aJavaArchiveusing the test class simple name and.jarextension.static org.jboss.shrinkwrap.api.spec.JavaArchiveCreates aJavaArchivewith the specified name and.jarextension.static org.jboss.shrinkwrap.api.spec.ResourceAdapterArchiveCreates aResourceAdapterArchiveusing the test class simple name and.rarextension.static org.jboss.shrinkwrap.api.spec.ResourceAdapterArchiveCreates aResourceAdapterArchivewith the specified name and.rarextension.static org.jboss.shrinkwrap.api.spec.WebArchiveCreates aWebArchiveusing the test class simple name and.warextension.static org.jboss.shrinkwrap.api.spec.WebArchiveCreates aWebArchivewith the specified name and.warextension.
-
Method Details
-
war
Creates aWebArchivewith the specified name and.warextension.- Parameters:
name- the name of the archive (without extension)- Returns:
- a new WebArchive
-
war
Creates aWebArchiveusing the test class simple name and.warextension.- Parameters:
testClass- the test class to derive the name from- Returns:
- a new WebArchive
-
jar
Creates aJavaArchivewith the specified name and.jarextension.- Parameters:
name- the name of the archive (without extension)- Returns:
- a new JavaArchive
-
jar
Creates aJavaArchiveusing the test class simple name and.jarextension.- Parameters:
testClass- the test class to derive the name from- Returns:
- a new JavaArchive
-
rar
Creates aResourceAdapterArchivewith the specified name and.rarextension.- Parameters:
name- the name of the archive (without extension)- Returns:
- a new ResourceAdapterArchive
-
rar
Creates aResourceAdapterArchiveusing the test class simple name and.rarextension.- Parameters:
testClass- the test class to derive the name from- Returns:
- a new ResourceAdapterArchive
-