public class BinaryResolver extends Object
| Constructor and Description |
|---|
BinaryResolver(org.apache.maven.project.MavenProject mavenProject,
org.apache.maven.execution.MavenSession mavenSession,
org.apache.maven.plugin.BuildPluginManager pluginManager,
Path mavenTargetDirectory,
Optional<Path> externalBinaryPath,
Map<String,URL> releaseArchiveUrl,
org.apache.maven.plugin.logging.Log log) |
| Modifier and Type | Method and Description |
|---|---|
static Path |
guessUnpackedBinary(Path fromPath,
Architecture arch)
Walks the files in fromPath to find what is likely the shellcheck binary.
|
Path |
resolve(BinaryResolutionMethod resolutionMethod)
Performs binary resolution.
|
public BinaryResolver(org.apache.maven.project.MavenProject mavenProject,
org.apache.maven.execution.MavenSession mavenSession,
org.apache.maven.plugin.BuildPluginManager pluginManager,
Path mavenTargetDirectory,
Optional<Path> externalBinaryPath,
Map<String,URL> releaseArchiveUrl,
org.apache.maven.plugin.logging.Log log)
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 loggerpublic Path resolve(BinaryResolutionMethod resolutionMethod) throws org.apache.maven.plugin.MojoExecutionException, IOException
resolutionMethod - the desiderd resolution method.org.apache.maven.plugin.MojoExecutionException - if there are problems while resolvingIOException - in case some io operation fails (e.g download or permission change)public static Path guessUnpackedBinary(Path fromPath, Architecture arch) throws IOException
No actual check inspecting the binary is done, the likely binary is "found" only by name.
fromPath - the root path from which to start the search.arch - the current detected architectureFileNotFoundException - if the binary is not foundIOException - if the there is an IO problem while walking the filesystemCopyright © 2020–2023 Marco Nicolini. All rights reserved.