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:
java.io.Closeable
,java.lang.AutoCloseable
,ResourceFactory
public class SelectiveJarResource extends JarResource
SelectiveJarResource Selectively copies resources from a jar file based on includes/excludes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>
DEFAULT_EXCLUDES
static java.util.List<java.lang.String>
DEFAULT_INCLUDES
-
Fields inherited from class org.eclipse.jetty.util.resource.JarResource
_jarConnection
-
Fields inherited from class org.eclipse.jetty.util.resource.URLResource
_connection, _in, _url, _urlString
-
Fields inherited from class org.eclipse.jetty.util.resource.Resource
__defaultUseCaches
-
-
Constructor Summary
Constructors Constructor Description SelectiveJarResource(java.net.URL url)
SelectiveJarResource(java.net.URL url, boolean useCaches)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyTo(java.io.File directory)
Copy the Resource to the new destination file.protected boolean
isExcluded(java.lang.String name)
protected boolean
isIncluded(java.lang.String name)
void
setCaseSensitive(boolean caseSensitive)
void
setExcludes(java.util.List<java.lang.String> patterns)
void
setIncludes(java.util.List<java.lang.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, getURL, getUseCaches, hashCode, isContainedIn, isDirectory, lastModified, length, list, renameTo, toString
-
Methods inherited from class org.eclipse.jetty.util.resource.Resource
encode, finalize, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getListHTML, getResource, getURI, getWeakETag, getWeakETag, isAlias, isContainedIn, isSame, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeTo
-
-
-
-
Method Detail
-
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)
-
setIncludes
public void setIncludes(java.util.List<java.lang.String> patterns)
-
setExcludes
public void setExcludes(java.util.List<java.lang.String> patterns)
-
isIncluded
protected boolean isIncluded(java.lang.String name)
-
isExcluded
protected boolean isExcluded(java.lang.String name)
-
copyTo
public void copyTo(java.io.File directory) throws java.io.IOException
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:
java.io.IOException
- if unable to copy the resource- See Also:
JarResource.copyTo(java.io.File)
-
-