Package org.apache.maven.plugins.invoker
Class InvokerSession
- java.lang.Object
-
- org.apache.maven.plugins.invoker.InvokerSession
-
class InvokerSession extends java.lang.ObjectTracks a set of build jobs and their results.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<BuildJob>buildJobsprivate java.util.List<BuildJob>errorJobsprivate java.util.List<BuildJob>failedJobsprivate java.util.List<BuildJob>skippedJobsprivate java.util.List<BuildJob>successfulJobs
-
Constructor Summary
Constructors Constructor Description InvokerSession()Creates a new empty session.InvokerSession(java.util.List<BuildJob> buildJobs)Creates a session that initially contains the specified build jobs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddJob(BuildJob buildJob)Adds the specified build job to this session.java.util.List<BuildJob>getErrorJobs()Gets the build jobs which had errors for this session.java.util.List<BuildJob>getFailedJobs()Gets the failed build jobs in this session.java.util.List<BuildJob>getJobs()Gets the build jobs in this session.java.util.List<BuildJob>getSkippedJobs()Gets the skipped build jobs in this session.java.util.List<BuildJob>getSuccessfulJobs()Gets the successful build jobs in this session.voidhandleFailures(org.apache.maven.plugin.logging.Log logger, boolean ignoreFailures)Handles the build failures in this session.voidlogSummary(org.apache.maven.plugin.logging.Log logger, boolean ignoreFailures)Prints a summary of this session to the specified logger.private voidresetStats()voidsetJobs(java.util.List<? extends BuildJob> buildJobs)Sets the build jobs of this session.private voidupdateStats()
-
-
-
Constructor Detail
-
InvokerSession
InvokerSession()
Creates a new empty session.
-
InvokerSession
InvokerSession(java.util.List<BuildJob> buildJobs)
Creates a session that initially contains the specified build jobs.- Parameters:
buildJobs- The build jobs to set, must not benull.
-
-
Method Detail
-
addJob
public void addJob(BuildJob buildJob)
Adds the specified build job to this session.- Parameters:
buildJob- The build job to add, must not benull.
-
setJobs
public void setJobs(java.util.List<? extends BuildJob> buildJobs)
Sets the build jobs of this session.- Parameters:
buildJobs- The build jobs to set, must not benull.
-
getJobs
public java.util.List<BuildJob> getJobs()
Gets the build jobs in this session.- Returns:
- The build jobs in this session, can be empty but never
null.
-
getSuccessfulJobs
public java.util.List<BuildJob> getSuccessfulJobs()
Gets the successful build jobs in this session.- Returns:
- The successful build jobs in this session, can be empty but never
null.
-
getFailedJobs
public java.util.List<BuildJob> getFailedJobs()
Gets the failed build jobs in this session.- Returns:
- The failed build jobs in this session, can be empty but never
null.
-
getErrorJobs
public java.util.List<BuildJob> getErrorJobs()
Gets the build jobs which had errors for this session.- Returns:
- The build jobs in error for this session, can be empty but never
null.
-
getSkippedJobs
public java.util.List<BuildJob> getSkippedJobs()
Gets the skipped build jobs in this session.- Returns:
- The skipped build jobs in this session, can be empty but never
null.
-
resetStats
private void resetStats()
-
updateStats
private void updateStats()
-
logSummary
public void logSummary(org.apache.maven.plugin.logging.Log logger, boolean ignoreFailures)Prints a summary of this session to the specified logger.- Parameters:
logger- The mojo logger to output messages to, must not benull.ignoreFailures- A flag whether failures should be ignored or whether a build failure should be signaled.
-
handleFailures
public void handleFailures(org.apache.maven.plugin.logging.Log logger, boolean ignoreFailures) throws org.apache.maven.plugin.MojoFailureExceptionHandles the build failures in this session.- Parameters:
logger- The mojo logger to output messages to, must not benull.ignoreFailures- A flag whether failures should be ignored or whether a build failure should be signaled.- Throws:
org.apache.maven.plugin.MojoFailureException- If failures are present and not ignored.
-
-