Package org.eclipse.jetty.maven.plugin
Class SelectiveJarResource
java.lang.Object
org.eclipse.jetty.util.resource.Resource
org.eclipse.jetty.util.resource.URLResource
org.eclipse.jetty.util.resource.JarResource
org.eclipse.jetty.maven.plugin.SelectiveJarResource
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ResourceFactory
SelectiveJarResource
Selectively copies resources from a jar file based on includes/excludes.
-
Field Summary
Modifier and TypeFieldDescriptionDefault is to exclude nothing.Default matches every resource.Fields inherited from class org.eclipse.jetty.util.resource.JarResource
_jarConnection
Fields inherited from class org.eclipse.jetty.util.resource.URLResource
_connection, _in, _lock, _url, _urlString
Fields inherited from class org.eclipse.jetty.util.resource.Resource
__defaultUseCaches
-
Constructor Summary
ConstructorDescriptionSelectiveJarResource
(URL url) SelectiveJarResource
(URL url, boolean useCaches) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Copy the Resource to the new destination file.protected boolean
isExcluded
(String name) protected boolean
isIncluded
(String name) void
setCaseSensitive
(boolean caseSensitive) void
setExcludes
(List<String> patterns) void
setIncludes
(List<String> patterns) Methods inherited from class org.eclipse.jetty.util.resource.JarResource
checkConnection, close, exists, getFile, getInputStream, newConnection, newJarResource
Methods inherited from class org.eclipse.jetty.util.resource.URLResource
addPath, delete, equals, getInputStream, getName, getReadableByteChannel, getURI, getUseCaches, hashCode, isContainedIn, isDirectory, lastModified, length, list, renameTo, toString
Methods inherited from class org.eclipse.jetty.util.resource.Resource
fromList, fromList, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getResource, getWeakETag, getWeakETag, isAlias, isContainedIn, isSame, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, resolveAlias, setAssociate, setDefaultUseCaches, toURL
-
Field Details
-
DEFAULT_INCLUDES
Default matches every resource. -
DEFAULT_EXCLUDES
Default is to exclude nothing.
-
-
Constructor Details
-
SelectiveJarResource
-
SelectiveJarResource
-
-
Method Details
-
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive) -
setIncludes
-
setExcludes
-
isIncluded
-
isExcluded
-
copyTo
Description copied from class:Resource
Copy the Resource to the new destination file.Will not replace existing destination file.
- Overrides:
copyTo
in classJarResource
- Parameters:
directory
- the destination file to create- Throws:
IOException
- if unable to copy the resource
-