Package io.helidon.build.devloop.maven
Class MavenProjectSupplier
java.lang.Object
io.helidon.build.devloop.maven.MavenProjectSupplier
- All Implemented Interfaces:
ProjectSupplier
A
ProjectSupplier for Maven projects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the build file supported by this supplier, e.g.changedSince(Path projectDir, FileTime lastCheckTime) Returns the most recent modification time if any project file has a modified time more recent than the given time.changedSince(Path projectDir, FileTime lastCheckTime, FileChanges.DetectionType type) Checks whether any matching file has a modified time more recent than the given time.changedSince(Path projectDir, FileTime lastCheckTime, Predicate<Path> dirFilter, Predicate<Path> fileFilter, FileChanges.DetectionType type) Checks whether any matching file has a modified time more recent than the given time.booleanhasChanges(Path projectDir, FileTime lastCheckTime) Returns whether or not any project file has a modified time more recent than the given time.newProject(BuildExecutor executor, boolean clean, boolean allowSkip, int cycleNumber) Returns a newProjectinstance from the project directory that has been successfully built.
-
Constructor Details
-
MavenProjectSupplier
Constructor.- Parameters:
config- The build configuration.
-
-
Method Details
-
hasChanges
Description copied from interface:ProjectSupplierReturns whether or not any project file has a modified time more recent than the given time.- Specified by:
hasChangesin interfaceProjectSupplier- Parameters:
projectDir- The project directory.lastCheckTime- The time to check against.- Returns:
trueif changed.
-
changedSince
Description copied from interface:ProjectSupplierReturns the most recent modification time if any project file has a modified time more recent than the given time.- Specified by:
changedSincein interfaceProjectSupplier- Parameters:
projectDir- The project directory.lastCheckTime- The time to check against.- Returns:
- The time, if changed.
-
changedSince
public static Optional<FileTime> changedSince(Path projectDir, FileTime lastCheckTime, FileChanges.DetectionType type) Checks whether any matching file has a modified time more recent than the given time.- Parameters:
projectDir- The project directory.lastCheckTime- The time to check against.type- The type of search.- Returns:
- The time, if changed.
-
changedSince
public static Optional<FileTime> changedSince(Path projectDir, FileTime lastCheckTime, Predicate<Path> dirFilter, Predicate<Path> fileFilter, FileChanges.DetectionType type) Checks whether any matching file has a modified time more recent than the given time.- Parameters:
projectDir- The project directory.lastCheckTime- The time to check against.dirFilter- A filter for directories to visit.fileFilter- A filter for which files to check.type- The type of search.- Returns:
- The time, if changed.
-
newProject
public Project newProject(BuildExecutor executor, boolean clean, boolean allowSkip, int cycleNumber) throws Exception Description copied from interface:ProjectSupplierReturns a newProjectinstance from the project directory that has been successfully built. Implementations must callBuildMonitor.onBuildStart(int, BuildType)if a build is performed.- Specified by:
newProjectin interfaceProjectSupplier- Parameters:
executor- The build executor.clean-trueif the project should be cleaned and built.allowSkip-trueif the project build can be skipped if up to date.cycleNumber- The cycle number.- Returns:
- The project instance, guaranteed to have been successfully built.
- Throws:
IllegalArgumentException- if the project directory is not a valid.Exception- if the build fails.
-
buildFileName
Description copied from interface:ProjectSupplierReturns the name of the build file supported by this supplier, e.g. "pom.xml".- Specified by:
buildFileNamein interfaceProjectSupplier- Returns:
- The name.
-