Class MavenWebAppContext
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.Handler.Abstract
org.eclipse.jetty.server.Handler.AbstractContainer
org.eclipse.jetty.server.Handler.Wrapper
org.eclipse.jetty.server.handler.ContextHandler
org.eclipse.jetty.ee10.servlet.ServletContextHandler
org.eclipse.jetty.ee10.webapp.WebAppContext
org.eclipse.jetty.ee10.maven.plugin.MavenWebAppContext
- All Implemented Interfaces:
org.eclipse.jetty.ee10.webapp.WebAppClassLoader.Context,org.eclipse.jetty.server.AliasCheck,org.eclipse.jetty.server.Deployable,org.eclipse.jetty.server.Handler,org.eclipse.jetty.server.Handler.Container,org.eclipse.jetty.server.Handler.Singleton,org.eclipse.jetty.server.Request.Handler,org.eclipse.jetty.util.Attributes,org.eclipse.jetty.util.ClassVisibilityChecker,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle,org.eclipse.jetty.util.thread.Invocable
public class MavenWebAppContext
extends org.eclipse.jetty.ee10.webapp.WebAppContext
MavenWebAppContext
Extends the WebAppContext to specialize for the maven environment. We pass in the list of files that should form the classpath for the webapp when executing in the plugin, and any jetty-env.xml file that may have been configured.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.ee10.webapp.WebAppContext
org.eclipse.jetty.ee10.webapp.WebAppContext.ServletApiContextNested classes/interfaces inherited from class org.eclipse.jetty.ee10.servlet.ServletContextHandler
org.eclipse.jetty.ee10.servlet.ServletContextHandler.ContextStatus, org.eclipse.jetty.ee10.servlet.ServletContextHandler.JspConfig, org.eclipse.jetty.ee10.servlet.ServletContextHandler.JspPropertyGroup, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletContainerInitializerCaller, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletContainerInitializerStarter, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletContextApi, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletContextScopeListener, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletRequestInfo, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletResponseInfo, org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletScopedContext, org.eclipse.jetty.ee10.servlet.ServletContextHandler.TagLibNested classes/interfaces inherited from class org.eclipse.jetty.server.handler.ContextHandler
org.eclipse.jetty.server.handler.ContextHandler.Availability, org.eclipse.jetty.server.handler.ContextHandler.ContextScopeListener, org.eclipse.jetty.server.handler.ContextHandler.ScopedContextNested classes/interfaces inherited from class org.eclipse.jetty.server.Handler.Abstract
org.eclipse.jetty.server.Handler.Abstract.NonBlockingNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
org.eclipse.jetty.util.Attributes.Layer, org.eclipse.jetty.util.Attributes.Lazy, org.eclipse.jetty.util.Attributes.Mapped, org.eclipse.jetty.util.Attributes.Synthetic, org.eclipse.jetty.util.Attributes.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.server.Handler
org.eclipse.jetty.server.Handler.Abstract, org.eclipse.jetty.server.Handler.AbstractContainer, org.eclipse.jetty.server.Handler.Collection, org.eclipse.jetty.server.Handler.Container, org.eclipse.jetty.server.Handler.Sequence, org.eclipse.jetty.server.Handler.Singleton, org.eclipse.jetty.server.Handler.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
org.eclipse.jetty.util.thread.Invocable.Callable, org.eclipse.jetty.util.thread.Invocable.InvocationType, org.eclipse.jetty.util.thread.Invocable.ReadyTask, org.eclipse.jetty.util.thread.Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.ee10.webapp.WebAppContext
__dftServerClasses, __dftSystemClasses, SERVER_SRV_CLASSES, SERVER_SYS_CLASSES, WEB_DEFAULTS_XMLFields inherited from class org.eclipse.jetty.ee10.servlet.ServletContextHandler
__environment, _contextStatus, _jspConfig, _objFactory, _options, _securityHandler, _servletHandler, _sessionHandler, DEFAULT_LISTENER_TYPE_INDEX, DEFAULT_MAX_FORM_CONTENT_SIZE, DEFAULT_MAX_FORM_KEYS, ENVIRONMENT, EXTENDED_LISTENER_TYPE_INDEX, MAX_FORM_CONTENT_SIZE_KEY, MAX_FORM_KEYS_KEY, NO_SECURITY, NO_SESSIONS, SECURITY, SERVLET_LISTENER_TYPES, SESSIONSFields inherited from class org.eclipse.jetty.server.handler.ContextHandler
CROSS_CONTEXT_ATTRIBUTE, MANAGED_ATTRIBUTESFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.Attributes
NULLFields inherited from interface org.eclipse.jetty.server.Deployable
ATTRIBUTE_PREFIX, CONFIGURATION_CLASSES, CONTAINER_SCAN_JARS, CONTEXT_HANDLER_CLASS, CONTEXT_PATH, DEFAULTS_DESCRIPTOR, EE_ENVIRONMENT_NAME_PATTERN, ENVIRONMENT, ENVIRONMENT_COMPARATOR, ENVIRONMENT_XML, EXTRACT_WARS, PARENT_LOADER_PRIORITY, SCI_EXCLUSION_PATTERN, SCI_ORDER, TEMP_DIR, WAR, WEBINF_SCAN_JARSFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEYFields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPattern(String s, String pattern) voiddoStart()voiddoStop()booleanGet the originAttribute.List<org.eclipse.jetty.maven.Overlay> org.eclipse.jetty.util.resource.ResourcegetResource(String pathInContext) getResourcePaths(String path) voidinitCDI()protected org.eclipse.jetty.ee10.webapp.ConfigurationsvoidsetBaseAppFirst(boolean value) voidsetClasses(File dir) voidsetContainerIncludeJarPattern(String pattern) voidsetJettyEnvXml(String jettyEnvXml) voidsetOriginAttribute(String name) Set the name of the attribute that is used in each generated xml element to indicate the source of the xml element (eg annotation, web.xml etc).voidsetOverlays(List<org.eclipse.jetty.maven.Overlay> overlays) Ordered list of wars to overlay on top of the current project.voidsetResourceBases(String[] resourceBases) This method is provided as a convenience for jetty maven plugin configurationvoidsetTestClasses(File dir) voidsetWebInfIncludeJarPattern(String pattern) voidsetWebInfLib(List<File> jars) Methods inherited from class org.eclipse.jetty.ee10.webapp.WebAppContext
addConfiguration, addHiddenClassMatcher, addOverrideDescriptor, addProtectedClassMatcher, addServerClasses, addServerClassMatcher, addSystemClasses, addSystemClassMatcher, cleanupAfterStop, configure, configureClassLoader, createTempDirectory, destroy, dump, getConfiguration, getConfigurationClasses, getConfigurations, getCurrentWebAppContext, getDefaultsDescriptor, getDescriptor, getExtraClasspath, getHiddenClasses, getHiddenClassMatcher, getMetaData, getOverrideDescriptor, getOverrideDescriptors, getPermissions, getProtectedClasses, getProtectedClassMatcher, getResourceAlias, getResourceAliases, getResourceFactory, getServerClasses, getServerClassMatcher, getSystemClasses, getSystemClassMatcher, getUnavailableException, getWar, getWebInf, initializeDefaults, isAllowDuplicateFragmentNames, isConfigurationDiscovered, isContextPathDefault, isCopyWebDir, isCopyWebInf, isDistributable, isExtractWAR, isHiddenClass, isHiddenResource, isLogUrlOnStart, isParentLoaderPriority, isProtectedClass, isProtectedResource, isServerClass, isSystemClass, isThrowUnavailableOnStartupException, loadConfigurations, newServletContextApi, postConfigure, preConfigure, removeConfiguration, removeConfiguration, removeEventListener, removeResourceAlias, setAllowDuplicateFragmentNames, setClassLoader, setConfigurationClasses, setConfigurationClasses, setConfigurationDiscovered, setConfigurations, setConfigurations, setContextPath, setContextWhiteList, setCopyWebDir, setCopyWebInf, setDefaultContextPath, setDefaultsDescriptor, setDescriptor, setDisplayName, setDistributable, setExtraClasspath, setExtraClasspath, setExtractWAR, setHiddenClassMatcher, setLogUrlOnStart, setOverrideDescriptor, setOverrideDescriptors, setParentLoaderPriority, setPermissions, setProtectedClassMatcher, setResourceAlias, setResourceAliases, setServer, setServerClassMatcher, setServletSecurity, setSystemClassMatcher, setThrowUnavailableOnStartupException, setWar, setWarResource, startContext, startWebapp, stopContext, stopWebapp, toStringMethods inherited from class org.eclipse.jetty.ee10.servlet.ServletContextHandler
addEventListener, addFilter, addFilter, addFilter, addFilter, addLocaleEncoding, addProgrammaticListener, addRoles, addServlet, addServlet, addServlet, addServlet, addServletContainerInitializer, addServletContainerInitializer, addServletContainerInitializer, callContextDestroyed, callContextInitialized, contextDestroyed, contextInitialized, dynamicHolderAdded, getContext, getContextPathEncoded, getCurrentServletContext, getCurrentServletContextHandler, getDefaultRequestCharacterEncoding, getDefaultResponseCharacterEncoding, getDefaultSecurityHandlerClass, getInitParameter, getInitParameterNames, getInitParams, getInvocationType, getLocaleEncoding, getLocaleEncoding, getLocaleEncodings, getLogger, getMaxFormContentSize, getMaxFormKeys, getObjectFactory, getRequestContextPath, getSecurityHandler, getServletContext, getServletContext, getServletContextHandler, getServletContextHandler, getServletHandler, getSessionHandler, getWelcomeFiles, handleByContextHandler, insertHandler, isDurableListener, isProgrammaticListener, isUsingSecurityManager, loadClass, newContext, newResource, newResource, newResource, newSecurityHandler, newServletContextRequest, newServletHandler, newSessionHandler, notifyEnterScope, notifyExitScope, requestDestroyed, requestInitialized, setDefaultRequestCharacterEncoding, setDefaultResponseCharacterEncoding, setDefaultSecurityHandlerClass, setHandler, setInitParameter, setLogger, setMaxFormContentSize, setMaxFormKeys, setSecurityHandler, setServletHandler, setSessionHandler, setTempDirectory, setUsingSecurityManager, setWelcomeFiles, wrapRequest, wrapResponseMethods inherited from class org.eclipse.jetty.server.handler.ContextHandler
addAliasCheck, addVirtualHosts, checkAlias, checkVirtualHost, clearAliasChecks, clearAttributes, enterScope, exitScope, getAliasChecks, getAllowNullPathInContext, getAttribute, getAttributeNameSet, getBaseResource, getClassLoader, getClassPath, getContextHandler, getContextPath, getCrossContextHandler, getCurrentContext, getCurrentContext, getCurrentContextHandler, getDisplayName, getErrorHandler, getMimeTypes, getProtectedTargets, getTempDirectory, getVirtualHosts, handle, handleMovedPermanently, handleUnavailable, isAvailable, isCrossContextDispatchSupported, isProtectedTarget, isTempDirectoryPersistent, removeAttribute, removeVirtualHosts, setAliasChecks, setAllowNullPathInContext, setAttribute, setAvailable, setBaseResource, setBaseResourceAsPath, setBaseResourceAsString, setCrossContextDispatchSupported, setErrorHandler, setProtectedTargets, setTempDirectoryPersistent, setVirtualHostsMethods inherited from class org.eclipse.jetty.server.Handler.Wrapper
getHandlerMethods inherited from class org.eclipse.jetty.server.Handler.AbstractContainer
findContainerOf, getDescendant, getDescendants, isDynamic, setDynamicMethods inherited from class org.eclipse.jetty.server.Handler.Abstract
getServerMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addManaged, contains, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap, equals, hashCodeMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.server.Handler
getServerMethods inherited from interface org.eclipse.jetty.server.Handler.Container
getContainer, getDescendant, getDescendants, getDescendantsMethods inherited from interface org.eclipse.jetty.server.Handler.Singleton
getHandlers, getTail, setHandlerMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stopMethods inherited from interface org.eclipse.jetty.ee10.webapp.WebAppClassLoader.Context
isServerResource, isSystemResource, newResource
-
Constructor Details
-
MavenWebAppContext
public MavenWebAppContext()
-
-
Method Details
-
setContainerIncludeJarPattern
-
getContainerIncludeJarPattern
-
getWebInfIncludeJarPattern
-
setWebInfIncludeJarPattern
-
getClassPathUris
-
setJettyEnvXml
-
getJettyEnvXml
-
setClasses
-
getClasses
-
setWebInfLib
-
setTestClasses
-
getTestClasses
-
setOverlays
Ordered list of wars to overlay on top of the current project. The list may contain an overlay that represents the current project.- Parameters:
overlays- the list of overlays
-
setOriginAttribute
Set the name of the attribute that is used in each generated xml element to indicate the source of the xml element (eg annotation, web.xml etc).- Parameters:
name- the name of the attribute to use.
-
getOriginAttribute
-
getOverlays
-
setBaseAppFirst
public void setBaseAppFirst(boolean value) -
getBaseAppFirst
public boolean getBaseAppFirst() -
setResourceBases
This method is provided as a convenience for jetty maven plugin configuration- Parameters:
resourceBases- Array of resources strings to set as aCombinedResource.
-
getWebInfLib
-
getWebInfClasses
-
doStart
-
newConfigurations
protected org.eclipse.jetty.ee10.webapp.Configurations newConfigurations()- Overrides:
newConfigurationsin classorg.eclipse.jetty.ee10.webapp.WebAppContext
-
doStop
-
getResource
public org.eclipse.jetty.util.resource.Resource getResource(String pathInContext) throws MalformedURLException - Overrides:
getResourcein classorg.eclipse.jetty.ee10.webapp.WebAppContext- Throws:
MalformedURLException
-
getResourcePaths
-
addPattern
-
initCDI
public void initCDI()
-