org.apache.maven.plugin.resources

## Class ResourcesMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.apache.maven.plugin.resources.ResourcesMojo

All Implemented Interfaces:
  org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

Direct Known Subclasses:
  CopyResourcesMojo, TestResourcesMojo

    public class ResourcesMojo
    extends org.apache.maven.plugin.AbstractMojo

Copy resources for the main source code to the main output directory.

Version:
  $Id: ResourcesMojo.java 698374 2008-09-23 22:04:22Z olamy $
Author:
  Michal Maczka, Jason van Zyl, Andreas Hoheneder, William Ferguson

### Field Summary

Fields
`protected String` `encoding` The character encoding scheme to be applied when filtering resources.
`protected String` `escapeString` Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
`protected List` `filters` The list of additional key-value pairs aside from that of the System, and that of the project, which would be used for the filtering.
`protected boolean` `includeEmptyDirs` Copy any empty directories included in the Ressources.
`protected org.apache.maven.shared.filtering.MavenResourcesFiltering` `mavenResourcesFiltering`
`protected List` `nonFilteredFileExtensions` Additionnal file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)
`protected org.apache.maven.project.MavenProject` `project`
`protected org.apache.maven.execution.MavenSession` `session`

### Fields inherited from interface org.apache.maven.plugin.Mojo

`ROLE`

### Constructor Summary

Constructors
Constructor and Description
`ResourcesMojo()`

### Method Summary

Methods
`void` `execute()`
`File` `getOutputDirectory()`
`List` `getResources()`
`boolean` `isIncludeEmptyDirs()`
`boolean` `isOverwrite()`
`void` `setIncludeEmptyDirs(boolean includeEmptyDirs)`
`void` `setOutputDirectory(File outputDirectory)`
`void` `setOverwrite(boolean overwrite)`
`void` `setResources(List resources)`

### Methods inherited from class org.apache.maven.plugin.AbstractMojo

`getLog, getPluginContext, setLog, setPluginContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### encoding

    protected String encoding

The character encoding scheme to be applied when filtering resources.

#### project

    protected org.apache.maven.project.MavenProject project

#### filters

    protected List filters

The list of additional key-value pairs aside from that of the System, and that of the project, which would be used for the filtering.

#### mavenResourcesFiltering

    protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering

#### session

    protected org.apache.maven.execution.MavenSession session

#### escapeString

    protected String escapeString

Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}

Since:
  2.3

#### includeEmptyDirs

    protected boolean includeEmptyDirs

Copy any empty directories included in the Ressources.

Since:
  2.3

#### nonFilteredFileExtensions

    protected List nonFilteredFileExtensions

Additionnal file extensions to not apply filtering (already defined are : jpg, jpeg, gif, bmp, png)

Since:
  2.3

### Constructor Detail

#### ResourcesMojo

    public ResourcesMojo()

### Method Detail

#### execute

    public void execute()
                 throws org.apache.maven.plugin.MojoExecutionException

Throws:
  `org.apache.maven.plugin.MojoExecutionException`

#### getResources

    public List getResources()

#### setResources

    public void setResources(List resources)

#### getOutputDirectory

    public File getOutputDirectory()

#### setOutputDirectory

    public void setOutputDirectory(File outputDirectory)

#### isOverwrite

    public boolean isOverwrite()

#### setOverwrite

    public void setOverwrite(boolean overwrite)

#### isIncludeEmptyDirs

    public boolean isIncludeEmptyDirs()

#### setIncludeEmptyDirs

    public void setIncludeEmptyDirs(boolean includeEmptyDirs)