public class JarCreator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EVERYTHING_PATTERN |
| Constructor and Description |
|---|
JarCreator() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
addJarContent(Manifest manifest,
Map entries)
Actual jar creation.
|
org.springframework.core.io.Resource |
createJar(Manifest manifest)
Create a jar using the current settings and return a
Resource
pointing to the jar. |
org.springframework.core.io.Resource |
createJar(Manifest manifest,
Map content)
Create a jar using the current settings and return a
Resource
pointing to the jar. |
String |
determineRootPath()
Resources' root path (the root path does not become part of the jar).
|
Collection |
getContainedPackages() |
String[] |
getContentPattern() |
org.springframework.core.io.support.ResourcePatternResolver |
getPatternResolver() |
String |
getRootPath() |
Storage |
getStorage() |
boolean |
isAddFolders() |
Map |
resolveContent()
Resolve the jar content based on its path.
|
void |
setAddFolders(boolean addFolders)
Whether the folders in which the files reside, should be added to the
archive.
|
void |
setContentPattern(String[] contentPattern)
Pattern for content matching.
|
void |
setPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver) |
void |
setRootPath(String rootPath) |
void |
setStorage(Storage jarStorage) |
public static final String EVERYTHING_PATTERN
public String determineRootPath()
protected int addJarContent(Manifest manifest, Map entries) throws IOException
manifest - to useentries - array of resource to include in the jarIOExceptionpublic org.springframework.core.io.Resource createJar(Manifest manifest)
Resource
pointing to the jar.manifest - public org.springframework.core.io.Resource createJar(Manifest manifest, Map content)
Resource
pointing to the jar.manifest - public Map resolveContent()
public Collection getContainedPackages()
public String[] getContentPattern()
public void setContentPattern(String[] contentPattern)
EVERYTHING_PATTERN
can become problematic on windows due to file system locking.contentPattern - The contentPattern to set.public org.springframework.core.io.support.ResourcePatternResolver getPatternResolver()
public void setPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver)
patternResolver - The patternResolver to set.public Storage getStorage()
public void setStorage(Storage jarStorage)
jarStorage - The jarStorage to set.public String getRootPath()
public void setRootPath(String rootPath)
rootPath - The rootPath to set.public boolean isAddFolders()
public void setAddFolders(boolean addFolders)
addFolders - The addFolders to set.Copyright © 2006–2023. All rights reserved.