Class IncrementalBuildHelper
java.lang.Object
org.apache.maven.shared.incremental.IncrementalBuildHelper
Various helper methods to support incremental builds
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIncrementalBuildHelper(org.apache.maven.plugin.MojoExecution mojoExecution, org.apache.maven.execution.MavenSession mavenSession) IncrementalBuildHelper(org.apache.maven.plugin.MojoExecution mojoExecution, org.apache.maven.project.MavenProject mavenProject) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterRebuildExecution(IncrementalBuildHelperRequest incrementalBuildHelperRequest) This method collects and stores all information about files changed since the call tobeforeRebuildExecution(org.apache.maven.shared.incremental.IncrementalBuildHelperRequest).String[]beforeRebuildExecution(IncrementalBuildHelperRequest incrementalBuildHelperRequest) This method shall get invoked before the actual Mojo task gets triggered, e.g.org.apache.maven.shared.utils.io.DirectoryScannerGet the existing DirectoryScanner used by this helper, or create new a DirectoryScanner if none is yet set.We use a specific status directory for each Mojo execution to store state which is needed during the next build invocation run.booleaninputFileTreeChanged(IncrementalBuildHelperRequest incrementalBuildHelperRequest) Detect whether the list of detected files has changed since the last build.booleaninputFileTreeChanged(org.apache.maven.shared.utils.io.DirectoryScanner dirScanner) Detect whether the list of detected files picked up by the DirectoryScanner has changed since the last build.voidsetDirectoryScanner(org.apache.maven.shared.utils.io.DirectoryScanner directoryScanner) Set the DirectoryScanner which shall get used by this build helper.
-
Field Details
-
CREATED_FILES_LST_FILENAME
- See Also:
-
-
Constructor Details
-
IncrementalBuildHelper
public IncrementalBuildHelper(org.apache.maven.plugin.MojoExecution mojoExecution, org.apache.maven.execution.MavenSession mavenSession) -
IncrementalBuildHelper
public IncrementalBuildHelper(org.apache.maven.plugin.MojoExecution mojoExecution, org.apache.maven.project.MavenProject mavenProject)
-
-
Method Details
-
getDirectoryScanner
public org.apache.maven.shared.utils.io.DirectoryScanner getDirectoryScanner()Get the existing DirectoryScanner used by this helper, or create new a DirectoryScanner if none is yet set. The DirectoryScanner is used for detecting changes in a directory -
getMojoStatusDirectory
We use a specific status directory for each Mojo execution to store state which is needed during the next build invocation run.- Returns:
- the directory for storing status information of the current Mojo execution.
- Throws:
org.apache.maven.plugin.MojoExecutionException
-