Class MavenProjectSupplier

    • Constructor Detail

      • MavenProjectSupplier

        public MavenProjectSupplier​(org.apache.maven.project.MavenProject project,
                                    org.apache.maven.execution.MavenSession session,
                                    org.apache.maven.plugin.BuildPluginManager plugins)
        Constructor.
        Parameters:
        project - The maven project.
        session - The maven session.
        plugins - The maven plugin manager.
    • Method Detail

      • hasChanges

        public boolean hasChanges​(Path projectDir,
                                  FileTime lastCheckTime)
        Description copied from interface: ProjectSupplier
        Returns whether or not any project file has a modified time more recent than the given time.
        Specified by:
        hasChanges in interface ProjectSupplier
        Parameters:
        projectDir - The project directory.
        lastCheckTime - The time to check against.
        Returns:
        true if changed.
      • changedSince

        public Optional<FileTime> changedSince​(Path projectDir,
                                               FileTime lastCheckTime)
        Description copied from interface: ProjectSupplier
        Returns the most recent modification time if any project file has a modified time more recent than the given time.
        Specified by:
        changedSince in interface ProjectSupplier
        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,
                                                      io.helidon.build.util.FileUtils.ChangeDetectionType 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.
      • newProject

        public Project newProject​(BuildExecutor executor,
                                  boolean clean,
                                  boolean allowSkip,
                                  int cycleNumber)
                           throws Exception
        Description copied from interface: ProjectSupplier
        Returns a new Project instance from the project directory that has been successfully built. Implementations must call BuildMonitor.onBuildStart(int, BuildType) if a build is performed.
        Specified by:
        newProject in interface ProjectSupplier
        Parameters:
        executor - The build executor.
        clean - true if the project should be cleaned and built.
        allowSkip - true if 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

        public String buildFileName()
        Description copied from interface: ProjectSupplier
        Returns the name of the build file supported by this supplier, e.g. "pom.xml".
        Specified by:
        buildFileName in interface ProjectSupplier
        Returns:
        The name.