|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CopySpec
A set of specifications for copying files. This includes:
into('webroot') exclude('**/.svn/**') from('src/main/webapp') { include '**/*.jsp' } from('src/main/js') { include '**/*.js' }In this example, the
into
and exclude
specifications at the
root level are inherited by the two child CopySpecs.
Method Summary | |
---|---|
CopySpec |
exclude(java.lang.String... excludes)
Adds an ANT style exclude pattern to the copy specification. |
CopySpec |
filter(java.lang.Class<java.io.FilterReader> filterType)
Adds a content filter to be used during the copy. |
CopySpec |
filter(java.util.Map<java.lang.String,java.lang.Object> map,
java.lang.Class<java.io.FilterReader> filterType)
Adds a content filter to be used during the copy. |
CopySpec |
from(java.lang.Iterable<java.lang.Object> sourcePaths)
Specifies sources for a copy. |
CopySpec |
from(java.lang.Iterable<java.lang.Object> sourcePaths,
groovy.lang.Closure c)
Specifies sources for a copy and creates a child CopySpec which is configured with the Closure. |
CopySpec |
from(java.lang.Object... sourcePaths)
Specifies sources for a copy. |
CopySpec |
from(java.lang.Object sourcePath,
groovy.lang.Closure c)
Specifies the source for a copy and creates a child CopySpec. |
CopySpec |
include(java.lang.String... includes)
Adds an ANT style include pattern to the copy specification. |
CopySpec |
into(java.lang.Object destPath)
Specifies the destination directory for a copy. |
CopySpec |
remapTarget(groovy.lang.Closure closure)
Maps a source file to a different relative location under the target directory. |
CopySpec |
rename(java.lang.String sourceRegEx,
java.lang.String replaceWith)
Renames files based on a regular expression. |
Method Detail |
---|
CopySpec from(java.lang.Object... sourcePaths)
Project.file()
.
Relative paths will be evaluated relative to the project directory.
sourcePaths
- Paths to source directories for the copyCopySpec from(java.lang.Object sourcePath, groovy.lang.Closure c)
Project.file()
.
sourcePath
- Path to source for the copyc
- closure for configuring the child CopySpecCopySpec from(java.lang.Iterable<java.lang.Object> sourcePaths)
Project.file()
.
sourcePaths
- Paths to source directories for the copyCopySpec from(java.lang.Iterable<java.lang.Object> sourcePaths, groovy.lang.Closure c)
Project.file()
.
sourcePaths
- Paths to source directories for the copyc
- Closure for configuring the child CopySpecCopySpec into(java.lang.Object destPath)
destPath
- Path to the destination directory for a CopyCopySpec include(java.lang.String... includes)
all files ending with 'jsp' (including subdirectories) **/*.jsp all files beginning with 'template_' in the level1/level2 directory level1/level2/template_* all files (including subdirectories) beneath src/main/webapp src/main/webapp/ all files beneath any CVS directory (including subdirectories) under src/main/java src/main/java/**/CVS/**If this method is not called, then all files beneath the source directory will be included. If this method is called, then a file must match at least one of the include patterns to be copied.
includes
- a vararg list of include patternsCopySpec exclude(java.lang.String... excludes)
include
for a description of the
syntax for patterns.
If this method is not called, then no files will be excluded.
If this method is called, then files must not match any exclude pattern
to be copied.
excludes
- a vararg list of exclude patternsCopySpec remapTarget(groovy.lang.Closure closure)
closure
- remap closureCopySpec rename(java.lang.String sourceRegEx, java.lang.String replaceWith)
Example:
rename '(.*)_OEM_BLUE_(.*)', '$1$2'would map the file 'style_OEM_BLUE_.css' to 'style.css'
sourceRegEx
- Source regular expressionreplaceWith
- Replacement string (use $ syntax for capture groups)CopySpec filter(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.Class<java.io.FilterReader> filterType)
Filter parameters may be specified using groovy map syntax.
Examples:
filter(HeadFilter, lines:25, skip:2) filter(ReplaceTokens, tokens:[copyright:'2009', version:'2.3.1'])
map
- map of filter parametersfilterType
- Class of filter to addCopySpec filter(java.lang.Class<java.io.FilterReader> filterType)
Examples:
filter(StripJavaComments) filter(com.mycompany.project.CustomFilter)
filterType
- Class of filter to add
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |