public class WarProbeOption extends Object implements Option
Users should create instances of this class using CoreOptions.warProbe() and then invoke
methods of this class in fluent syntax to configure the WAR probe.
| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_CLASS_PATH_EXCLUDES |
| Constructor and Description |
|---|
WarProbeOption()
Creates an empty WAR probe option.
|
| Modifier and Type | Method and Description |
|---|---|
WarProbeOption |
autoClasspath(boolean includeDefaultFilters)
Automatically add libraries and class folders from the current classpath.
|
WarProbeOption |
classes(Class<?>... klass)
Adds the given classes to the WAR in
WEB-INF/classes. |
WarProbeOption |
classPathDefaultExcludes()
Automatically add libraries and class folders from the current classpath, applying the
default classpath excludes.
|
WarProbeOption |
exclude(String... excludeRegExp)
This option implies
autoClasspath(false) and adds the given regular expressions to
the classpath filters. |
List<Class<?>> |
getClasses()
Returns the classes to be added to WEB-INF/classes.
|
List<String> |
getClassPathFilters()
Returns the classpath filters.
|
List<String> |
getLibraries()
Returns the WEB-INF libraries.
|
List<String> |
getMetaInfResources()
Returns the META-INF resources.
|
String |
getName()
Returns the application name of this WAR.
|
List<String> |
getOverlays()
Returns the overlays.
|
List<String> |
getResources()
Returns the classpath resources.
|
List<String> |
getWebInfResources()
Returns the WEB-INF resources.
|
boolean |
isClassPathEnabled()
Shall libraries and class folders be added automatically from the current classpath?
|
WarProbeOption |
library(String libraryPath)
Adds the library from the given path to the WAR.
|
WarProbeOption |
library(UrlReference libraryUrl)
Adds the library from the URL to the WAR.
|
WarProbeOption |
metaInfResource(String resourcePath)
Adds the given resourcs from the current class path to the WAR in
META-INF/. |
WarProbeOption |
name(String _name)
Sets the application name of this WAR.
|
WarProbeOption |
overlay(String overlayPath)
Adds an overlay from the given path to the WAR.
|
WarProbeOption |
overlay(UrlReference overlayUrl)
Adds an overlay from the given URL to the WAR.
|
WarProbeOption |
resources(String... resourcePaths)
Adds the given resources from the current class path to the WAR in
WEB-INF/classes. |
WarProbeOption |
webInfResource(String resourcePath)
Adds the given resource from the current class path to the WAR in
WEB-INF/. |
public static final String[] DEFAULT_CLASS_PATH_EXCLUDES
public WarProbeOption()
CoreOptions.warProbe() instead.public WarProbeOption name(String _name)
_name - application namethis for fluent syntaxpublic WarProbeOption library(String libraryPath)
WEB-INF/lib. The JAR name follows Maven conventions and is determined from properties
defined in any file named pom.properties, located in any subdirectory of
META-INF/maven, if available (otherwise, a random JAR name is generated).
If the path is not a directory, it is assumed to be a JAR, and its contents will be copied to
WEB-INF/lib.
libraryPath - path to librarythis for fluent syntaxpublic WarProbeOption library(UrlReference libraryUrl)
WEB-INF/lib.libraryUrl - URL referencing a library JARthis for fluent syntaxpublic WarProbeOption overlay(String overlayPath)
overlayPath - path to overlaythis for fluent syntaxpublic WarProbeOption overlay(UrlReference overlayUrl)
overlayUrl - URL to overlaythis for fluent syntaxpublic WarProbeOption classes(Class<?>... klass)
WEB-INF/classes.klass - list of classesthis for fluent syntaxpublic WarProbeOption resources(String... resourcePaths)
WEB-INF/classes.resourcePaths - list of resource paths, relative to the class path rootthis for fluent syntaxpublic WarProbeOption metaInfResource(String resourcePath)
META-INF/.resourcePath - resource path, relative to the class path rootthis for fluent syntaxpublic WarProbeOption webInfResource(String resourcePath)
WEB-INF/.resourcePath - resource path, relative to the class path rootthis for fluent syntaxpublic WarProbeOption autoClasspath(boolean includeDefaultFilters)
includeDefaultFilters - should the default classpath excludes be applied?this for fluent syntaxpublic WarProbeOption classPathDefaultExcludes()
this for fluent syntaxpublic WarProbeOption exclude(String... excludeRegExp)
autoClasspath(false) and adds the given regular expressions to
the classpath filters.excludeRegExp - list of regular expressions. Classpath libraries or folders matching any of these
will be excludedthis for fluent syntaxpublic String getName()
Internal API, do no use in application code.
public boolean isClassPathEnabled()
Internal API, do no use in application code.
public List<String> getLibraries()
Internal API, do no use in application code.
public List<String> getOverlays()
Internal API, do no use in application code.
public List<String> getClassPathFilters()
Internal API, do no use in application code.
public List<String> getMetaInfResources()
Internal API, do no use in application code.
public List<String> getWebInfResources()
Internal API, do no use in application code.
public List<String> getResources()
Internal API, do no use in application code.
Copyright © 2006–2021 OPS4J - Open Participation Software for Java. All rights reserved.