Package net.microfalx.talos.core
Class MavenConfiguration
java.lang.Object
net.microfalx.talos.core.MavenConfiguration
Resolves various Maven related configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDop()Returns the degree of parallelism.final org.apache.maven.execution.MavenSessionReturns the session.net.microfalx.resource.ResourcegetTargetDirectory(String name, boolean topLevel) Returns a director inside the target directory.net.microfalx.resource.ResourcegetTargetDirectory(org.apache.maven.project.MavenProject project, String name) Returns a director inside the target directory.net.microfalx.resource.ResourcegetTargetFile(String name, boolean topLevel) Returns a file inside the target directory.net.microfalx.resource.ResourcegetTargetFile(org.apache.maven.project.MavenProject project, String name) Returns a file inside the target directory.booleanReturns whether Maven was asked to build without any output.booleanReturns whether the build uses multiple threads to build the project.final booleanReturns whether the build should show the progress report.final booleanisQuiet()Returns whether the output in the terminal should be completely quiet.booleanReturns whether the build is quiet and progress was requested.final booleanReturns whether the output in the terminal should be verbose.booleanReturns whether the goals requested expect the output of Maven to have the usual verbosity.
-
Constructor Details
-
MavenConfiguration
public MavenConfiguration(org.apache.maven.execution.MavenSession session)
-
-
Method Details
-
getSession
public final org.apache.maven.execution.MavenSession getSession()Returns the session.- Returns:
- a non-null instance
-
isQuiet
public final boolean isQuiet()Returns whether the output in the terminal should be completely quiet.- Returns:
trueto disable all logging,falseotherwise
-
isMavenQuiet
public boolean isMavenQuiet()Returns whether Maven was asked to build without any output.- Returns:
trueif no output,falseotherwise
-
isVerbose
public final boolean isVerbose()Returns whether the output in the terminal should be verbose.- Returns:
trueto be verbose,falseotherwise
-
isVerboseGoals
public boolean isVerboseGoals()Returns whether the goals requested expect the output of Maven to have the usual verbosity.- Returns:
trueto shaw default Maven logging,falseotherwise
-
isProgress
public final boolean isProgress()Returns whether the build should show the progress report.- Returns:
trueto be verbose,falseotherwise
-
isQuietAndWithProgress
public boolean isQuietAndWithProgress()Returns whether the build is quiet and progress was requested.- Returns:
trueif quiet with progress,falseotherwise
-
isParallel
public boolean isParallel()Returns whether the build uses multiple threads to build the project.- Returns:
trueif parallel,falseotherwise
-
getDop
public int getDop()Returns the degree of parallelism.- Returns:
- a positiver integer
-
getTargetDirectory
Returns a director inside the target directory.- Parameters:
name- the name of the directory, null to get the target directorytopLevel-trueto select the top level target directory,falsefor the target directory of the current project- Returns:
- a non-null instance
-
getTargetFile
Returns a file inside the target directory.- Parameters:
name- the name of the filetopLevel-trueto select the top level target directory,falsefor the target directory of the current project- Returns:
- a non-null instance
-
getTargetDirectory
public net.microfalx.resource.Resource getTargetDirectory(org.apache.maven.project.MavenProject project, String name) Returns a director inside the target directory.- Parameters:
project- the projectname- the name of the directory- Returns:
- a non-null instance
-
getTargetFile
public net.microfalx.resource.Resource getTargetFile(org.apache.maven.project.MavenProject project, String name) Returns a file inside the target directory.- Parameters:
project- the projectname- the name of the file- Returns:
- a non-null instance
-