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.Path resolve​(BinaryResolutionMethod resolutionMethod)
    Performs binary resolution.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 download
      mavenSession - maven component for the delegated plugin download
      pluginManager - maven component for the delegated plugin download
      mavenTargetDirectory - the path to the current project target directory
      externalBinaryPath - the path to the external binary
      releaseArchiveUrl - the url where to find the wanted release of shellcheck
      log - a maven logger
  • Method Details

    • resolve

      public java.nio.file.Path resolve​(BinaryResolutionMethod resolutionMethod) throws org.apache.maven.plugin.MojoExecutionException, java.io.IOException
      Performs 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 resolving
      java.io.IOException - in case some io operation fails (e.g download or permission change)