Interface ProjectSupplier

  • All Known Implementing Classes:
    MavenProjectSupplier

    public interface ProjectSupplier
    A Project supplier.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String buildFileName()
      Returns the name of the build file supported by this supplier, e.g.
      Optional<FileTime> 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.
      boolean hasChanges​(Path projectDir, FileTime lastCheckTime)
      Returns whether or not any project file has a modified time more recent than the given time.
      Project newProject​(BuildExecutor executor, boolean clean, boolean allowSkip, int cycleNumber)
      Returns a new Project instance from the project directory that has been successfully built.
    • Method Detail

      • newProject

        Project newProject​(BuildExecutor executor,
                           boolean clean,
                           boolean allowSkip,
                           int cycleNumber)
                    throws Exception
        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.
        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.
      • hasChanges

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

        Optional<FileTime> 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.
        Parameters:
        projectDir - The project directory.
        lastCheckTime - The time to check against.
        Returns:
        The time, if changed.
      • buildFileName

        String buildFileName()
        Returns the name of the build file supported by this supplier, e.g. "pom.xml".
        Returns:
        The name.