Class PathResolver

java.lang.Object
io.jenkins.plugins.coverage.metrics.steps.PathResolver

public class PathResolver extends Object
Resolves source code files on the agent using the stored paths of the coverage reports. Since these paths are relative, this resolver tries to find the absolute paths by guessing the prefix to the relative path. It also evaluates the defined source paths as prefixes when resolving the absolute paths.
  • Constructor Details

    • PathResolver

      public PathResolver()
  • Method Details

    • resolvePaths

      public Map<String,String> resolvePaths(Set<String> relativePaths, Set<String> requestedSourceDirectories, FilePath workspace, edu.hm.hafner.util.FilteredLog log) throws InterruptedException
      Resolves source code files on the agent using the stored paths of the coverage reports. Since these paths are relative, this resolver tries to find the absolute paths by guessing the prefix to the relative path. It also evaluates the defined source paths as prefixes when resolving the absolute paths.
      Parameters:
      relativePaths - the relative paths to map
      requestedSourceDirectories - the requested relative and absolute source directories (in the step configuration)
      workspace - the workspace that contains the source code files
      log - the log to write to
      Returns:
      the resolved paths as mapping of relative to absolute paths
      Throws:
      InterruptedException