Class ArtifactScopeExcluded

java.lang.Object
org.owasp.dependencycheck.utils.Filter<String>
org.owasp.dependencycheck.maven.ArtifactScopeExcluded

public class ArtifactScopeExcluded extends Filter<String>
Utility class to determine if an artifact should be excluded.
Author:
Josh Cain
  • Constructor Summary

    Constructors
    Constructor
    Description
    ArtifactScopeExcluded(boolean skipTestScope, boolean skipProvidedScope, boolean skipSystemScope, boolean skipRuntimeScope)
    Constructs a new ArtifactScopeExcluded object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    passes(String scope)
    Tests is the artifact should be included in the scan (i.e. is the dependency in a scope that is being scanned).

    Methods inherited from class Filter

    filter, filter

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArtifactScopeExcluded

      public ArtifactScopeExcluded(boolean skipTestScope, boolean skipProvidedScope, boolean skipSystemScope, boolean skipRuntimeScope)
      Constructs a new ArtifactScopeExcluded object.
      Parameters:
      skipTestScope - whether or not to skip the test scope
      skipProvidedScope - whether or not to skip the provided scope
      skipSystemScope - whether or not to skip the system scope
      skipRuntimeScope - whether or not to skip the runtime scope
  • Method Details

    • passes

      public boolean passes(String scope)
      Tests is the artifact should be included in the scan (i.e. is the dependency in a scope that is being scanned).
      Specified by:
      passes in class Filter<String>
      Parameters:
      scope - the scope of the artifact to test
      Returns:
      true if the artifact is in an excluded scope; otherwise false