Package com.coderplus.plugins
Class RenameMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.coderplus.plugins.RenameMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="rename", defaultPhase=GENERATE_SOURCES, threadSafe=true) public class RenameMojo extends org.apache.maven.plugin.AbstractMojo
Rename files or directories during build.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private org.sonatype.plexus.build.incremental.BuildContext
buildContext
private java.io.File
destinationFile
The target file/directory nameprivate java.util.List<FileSet>
fileSets
Collection of FileSets to work on (FileSet contains sourceFile and destinationFile).(package private) boolean
ignoreFileNotFoundOnIncremental
Ignore errors if the source file/directory was not found during incremental build(package private) boolean
overWrite
Ignore File Not Found errors during incremental buildprivate org.apache.maven.project.MavenProject
project
private java.io.File
sourceFile
The file/directory which has to be renamed
-
Constructor Summary
Constructors Constructor Description RenameMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
copy(java.io.File srcFile, java.io.File destFile)
void
execute()
-
-
-
Field Detail
-
sourceFile
@Parameter(required=false) private java.io.File sourceFile
The file/directory which has to be renamed- Since:
- 1.0
-
destinationFile
@Parameter(required=false) private java.io.File destinationFile
The target file/directory name- Since:
- 1.0
-
fileSets
@Parameter(required=false) private java.util.List<FileSet> fileSets
Collection of FileSets to work on (FileSet contains sourceFile and destinationFile). See Usage for details.- Since:
- 1.0
-
overWrite
@Parameter(property="copy.overWrite", defaultValue="true") boolean overWrite
Ignore File Not Found errors during incremental build- Since:
- 1.0
-
ignoreFileNotFoundOnIncremental
@Parameter(property="copy.ignoreFileNotFoundOnIncremental", defaultValue="true") boolean ignoreFileNotFoundOnIncremental
Ignore errors if the source file/directory was not found during incremental build- Since:
- 1.0
-
project
@Component private org.apache.maven.project.MavenProject project
- Since:
- 1.0
-
buildContext
@Component private org.sonatype.plexus.build.incremental.BuildContext buildContext
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
copy
private void copy(java.io.File srcFile, java.io.File destFile) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-