org.jboss.cdi.tck.shrinkwrap
Class EnterpriseArchiveBuilder
java.lang.Object
org.jboss.cdi.tck.shrinkwrap.ArchiveBuilder<EnterpriseArchiveBuilder,org.jboss.shrinkwrap.api.spec.EnterpriseArchive>
org.jboss.cdi.tck.shrinkwrap.EnterpriseArchiveBuilder
public class EnterpriseArchiveBuilder
- extends ArchiveBuilder<EnterpriseArchiveBuilder,org.jboss.shrinkwrap.api.spec.EnterpriseArchive>
ShrinkWrap EnterpriseArchive builder for CDI TCK Arquillian test. This builder is intended to provide basic
functionality covering common TCK needs. Use shrinkwrap API to adapt archive to advanced scenarios.
Test classes are added to EJB module.
Default and custom web module
The default web module is defined in order to build portable EE archive - it has to contain Class-Path entry in the
MANIFEST.MF to state module dependency (see Class Loading Requirements in Java EE spec). Custom web module is not supported
directly however its possible to build such module with shrinkwrap API and add it to final enterprise archive. It is
necessary to omit default web module using noDefaultWebModule() as long as custom web module is used since
arquillian cannot handle in-container test packaged as EAR with multiple web modules at the moment (cannot determine which
web module to enrich).
application.xml
The application.xml descriptor is not supported as it is no longer required (Java EE 5, Java EE 6). Use
shrinkwrap API to add custom application.xml descriptor.
Use case
Use enterprise archive in TCK tests only while:
- explicitly testing EAR structure
- testing Java EE full profile (e.g. EJB timer service, MDBs)
Tests that use EnterpriseArchiveBuilder must belong to TestGroups.JAVAEE_FULL group.
- Author:
- Martin Kouba
| Fields inherited from class org.jboss.cdi.tck.shrinkwrap.ArchiveBuilder |
beansDescriptor, beansXml, classes, ejbJarDescriptor, ejbJarXml, excludedClasses, libraries, manifestResources, packages, persistenceDescriptor, resources, serviceProviders, shrinkWrapLibraries, webResources, webXml, webXmlDescriptor |
| Methods inherited from class org.jboss.cdi.tck.shrinkwrap.ArchiveBuilder |
build, debugMode, getBeansDescriptorAsset, getBeansDescriptorTarget, getName, isAsClientMode, isTestArchive, notTestArchive, processClasses, processLibraries, processManifestResources, processPackages, processResources, setAsClientMode, withBeanLibrary, withBeanLibrary, withBeanLibrary, withBeanLibrary, withBeansXml, withBeansXml, withClass, withClasses, withDefaultPersistenceXml, withEjbJarXml, withEjbJarXml, withExcludedClass, withExcludedClasses, withExtension, withExtensions, withLibraries, withLibrary, withLibrary, withLibrary, withLibrary, withLibrary, withManifestResource, withManifestResource, withManifestResource, withName, withPackage, withPersistenceXml, withResource, withResource, withResource, withServiceProvider, withTestClass, withTestClassDefinition, withTestClassPackage, withWebResource, withWebResource, withWebResource, withWebResource, withWebXml, withWebXml |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_APP_VERSION
public static final String DEFAULT_APP_VERSION
- See Also:
- Constant Field Values
DEFAULT_EAR_NAME
public static final String DEFAULT_EAR_NAME
- See Also:
- Constant Field Values
DEFAULT_EJB_MODULE_NAME
public static final String DEFAULT_EJB_MODULE_NAME
- See Also:
- Constant Field Values
EnterpriseArchiveBuilder
public EnterpriseArchiveBuilder()
noDefaultWebModule
public EnterpriseArchiveBuilder noDefaultWebModule()
- Do not add default web module.
- Returns:
- self
withEjbModuleName
public EnterpriseArchiveBuilder withEjbModuleName(String ejbModuleName)
self
public EnterpriseArchiveBuilder self()
- Specified by:
self in class ArchiveBuilder<EnterpriseArchiveBuilder,org.jboss.shrinkwrap.api.spec.EnterpriseArchive>
- Returns:
- self to enable generic builder
buildInternal
protected org.jboss.shrinkwrap.api.spec.EnterpriseArchive buildInternal()
- Specified by:
buildInternal in class ArchiveBuilder<EnterpriseArchiveBuilder,org.jboss.shrinkwrap.api.spec.EnterpriseArchive>
- Returns:
- concrete shrinkwrap archive
Copyright © 2008-2013 Seam Framework. All Rights Reserved.