Class ResourcesExecutor
java.lang.Object
net.agilhard.maven.plugins.jpacktool.base.mojo.ResourcesExecutor
- All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
public class ResourcesExecutor
extends java.lang.Object
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Copy resources for the main source code to the main output directory. Always
uses the project.build.resources element to specify the resources to copy.
- Author:
- Michal Maczka, Jason van Zyl, Andreas Hoheneder, William Ferguson, Bernd Eilers
-
Field Summary
Fields Modifier and Type Field Description protected PackagingResources
data
protected org.apache.maven.shared.filtering.MavenFileFilter
mavenFileFilter
java.util.List<org.apache.maven.shared.filtering.MavenResourcesFiltering>
mavenFilteringComponents
protected org.apache.maven.shared.filtering.MavenResourcesFiltering
mavenResourcesFiltering
protected org.apache.maven.project.MavenProject
project
protected org.apache.maven.execution.MavenSession
session
protected java.util.Map<java.lang.String,java.lang.Object>
templateMap
-
Constructor Summary
Constructors Constructor Description ResourcesExecutor(AbstractPackageToolMojo mojo, PackagingResources packagingResources, java.util.Map<java.lang.String,java.lang.Object> templateMap)
-
Method Summary
Modifier and Type Method Description void
contextualize(org.codehaus.plexus.context.Context context)
void
execute()
protected void
executeUserFilterComponents(org.apache.maven.shared.filtering.MavenResourcesExecution mavenResourcesExecution)
protected java.util.List<java.lang.String>
getCombinedFiltersList()
java.util.LinkedHashSet<java.lang.String>
getDelimiters()
java.util.List<java.lang.String>
getFilters()
org.apache.maven.plugin.logging.Log
getLog()
java.io.File
getOutputDirectory()
java.util.List<org.apache.maven.model.Resource>
getResources()
boolean
isIncludeEmptyDirs()
boolean
isOverwrite()
boolean
isSkip()
boolean
isUseDefaultDelimiters()
void
setDelimiters(java.util.LinkedHashSet<java.lang.String> delimiters)
void
setFilters(java.util.List<java.lang.String> filters)
void
setIncludeEmptyDirs(boolean includeEmptyDirs)
void
setOutputDirectory(java.io.File outputDirectory)
void
setOverwrite(boolean overwrite)
void
setResources(java.util.List<org.apache.maven.model.Resource> resources)
void
setUseDefaultDelimiters(boolean useDefaultDelimiters)
-
Field Details
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project -
mavenResourcesFiltering
@Component(role=org.apache.maven.shared.filtering.MavenResourcesFiltering.class, hint="default") protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering -
mavenFileFilter
@Component(role=org.apache.maven.shared.filtering.MavenFileFilter.class, hint="default") protected org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter -
mavenFilteringComponents
public java.util.List<org.apache.maven.shared.filtering.MavenResourcesFiltering> mavenFilteringComponents- Since:
- 2.4
-
session
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session -
data
-
templateMap
protected java.util.Map<java.lang.String,java.lang.Object> templateMap
-
-
Constructor Details
-
ResourcesExecutor
public ResourcesExecutor(AbstractPackageToolMojo mojo, PackagingResources packagingResources, java.util.Map<java.lang.String,java.lang.Object> templateMap)
-
-
Method Details
-
getLog
public org.apache.maven.plugin.logging.Log getLog() -
contextualize
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException- Specified by:
contextualize
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Throws:
org.codehaus.plexus.context.ContextException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
executeUserFilterComponents
protected void executeUserFilterComponents(org.apache.maven.shared.filtering.MavenResourcesExecution mavenResourcesExecution) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.shared.filtering.MavenFilteringException- Parameters:
mavenResourcesExecution
-MavenResourcesExecution
- Throws:
org.apache.maven.plugin.MojoExecutionException
- in case of wrong lookup.org.apache.maven.shared.filtering.MavenFilteringException
- in case of failure.- Since:
- 2.5
-
getCombinedFiltersList
protected java.util.List<java.lang.String> getCombinedFiltersList()- Returns:
- The combined filters.
-
getResources
public java.util.List<org.apache.maven.model.Resource> getResources()- Returns:
PackagingResources.resources
-
setResources
public void setResources(java.util.List<org.apache.maven.model.Resource> resources)- Parameters:
resources
- setPackagingResources.resources
-
getOutputDirectory
public java.io.File getOutputDirectory()- Returns:
PackagingResources.outputDirectory
-
setOutputDirectory
public void setOutputDirectory(java.io.File outputDirectory)- Parameters:
outputDirectory
- the output folder.
-
isOverwrite
public boolean isOverwrite()- Returns:
PackagingResources.overwrite
-
setOverwrite
public void setOverwrite(boolean overwrite)- Parameters:
overwrite
- true to overwrite false otherwise.
-
isIncludeEmptyDirs
public boolean isIncludeEmptyDirs()- Returns:
PackagingResources.includeEmptyDirs
-
setIncludeEmptyDirs
public void setIncludeEmptyDirs(boolean includeEmptyDirs)- Parameters:
includeEmptyDirs
- true/false.
-
getFilters
public java.util.List<java.lang.String> getFilters()- Returns:
PackagingResources.filters
-
setFilters
public void setFilters(java.util.List<java.lang.String> filters)- Parameters:
filters
- The filters to use.
-
getDelimiters
public java.util.LinkedHashSet<java.lang.String> getDelimiters()- Returns:
PackagingResources.delimiters
-
setDelimiters
public void setDelimiters(java.util.LinkedHashSet<java.lang.String> delimiters)- Parameters:
delimiters
- The delimiters to use.
-
isUseDefaultDelimiters
public boolean isUseDefaultDelimiters() -
setUseDefaultDelimiters
public void setUseDefaultDelimiters(boolean useDefaultDelimiters)- Parameters:
useDefaultDelimiters
- true to use${*}
-
isSkip
public boolean isSkip()- Returns:
PackagingResources.skip
-