Class BinaryResolver
java.lang.Object
dev.dimlight.maven.plugin.shellcheck.BinaryResolver
public class BinaryResolver
extends java.lang.Object
Groups differents ways of getting hold of the correct shellcheck binary.
-
Constructor Summary
Constructors Constructor Description BinaryResolver(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.BuildPluginManager pluginManager, java.nio.file.Path mavenTargetDirectory, java.util.Optional<java.nio.file.Path> externalBinaryPath, java.util.Map<java.lang.String,java.net.URL> releaseArchiveUrl, org.apache.maven.plugin.logging.Log log) -
Method Summary
Modifier and Type Method Description java.nio.file.Pathresolve(BinaryResolutionMethod resolutionMethod)Performs binary resolution.
-
Constructor Details
-
BinaryResolver
public BinaryResolver(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.BuildPluginManager pluginManager, java.nio.file.Path mavenTargetDirectory, java.util.Optional<java.nio.file.Path> externalBinaryPath, java.util.Map<java.lang.String,java.net.URL> releaseArchiveUrl, org.apache.maven.plugin.logging.Log log)- Parameters:
mavenProject- maven component for the delegated plugin downloadmavenSession- maven component for the delegated plugin downloadpluginManager- maven component for the delegated plugin downloadmavenTargetDirectory- the path to the current project target directoryexternalBinaryPath- the path to the external binaryreleaseArchiveUrl- the url where to find the wanted release of shellchecklog- a maven logger
-
-
Method Details
-
resolve
public java.nio.file.Path resolve(BinaryResolutionMethod resolutionMethod) throws org.apache.maven.plugin.MojoExecutionException, java.io.IOExceptionPerforms binary resolution.- Parameters:
resolutionMethod- the desiderd resolution method.- Returns:
- a executable shellcheck binary path
- Throws:
org.apache.maven.plugin.MojoExecutionException- if there are problems while resolvingjava.io.IOException- in case some io operation fails (e.g download or permission change)
-