Interface ProjectDependencyConfig

All Known Subinterfaces:
ProjectDependencyConfig.Mutable
All Known Implementing Classes:
ProjectDependencyConfigImpl

public interface ProjectDependencyConfig
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    fromFile(Path path)
    Read config from the specified file
    fromStream(InputStream inputStream)
    Read config from an input stream
    Collection<io.quarkus.maven.dependency.ArtifactCoords>
    Artifact coordinates patterns that should be skipped along with their dependencies when walking dependency trees.
    Dependency scopes that should be excluded resolving dependencies of root artifact.
    Java home directory that should be used when fetching dependency information from a Gradle project.
    Collection<io.quarkus.maven.dependency.ArtifactCoords>
     
    Collection<io.quarkus.maven.dependency.ArtifactCoords>
    Artifact coordinates patterns that should be included when walking dependency trees.
    int
    The depth level of a dependency tree of each supported Quarkus extension to capture.
    Comma-separated list of artifacts to log dependency trees for.
    List<io.quarkus.maven.dependency.ArtifactCoords>
    BOMs that should be enforced when resolving dependencies but should not be added as project artifacts.
    Information about the product whose dependencies are to be analyzed.
    Collection<io.quarkus.maven.dependency.ArtifactCoords>
    Artifacts that should be used as roots of dependency trees during analysis.
    io.quarkus.maven.dependency.ArtifactCoords
    Project BOM
    Project directory
    A list of build recipe repository URLs
    boolean
    Whether to exclude BOMs imported in the POMs of artifacts to be built from the list of artifacts to be built from source
    boolean
    Whether to exclude parent POMs from the list of artifacts to be built from source
    boolean
    Whether to use Java 8 to fetch dependency information from a Gradle project.
    boolean
     
    boolean
    Whether to exclude dependencies (and their transitive dependencies) that aren't managed in the BOM.
    boolean
    Whether to include optional dependencies of the root project artifacts
    boolean
    Deprecated.
    Deprecated in favor of the HACBS SCM locator that performs validation Whether to use the legacy SCM detector.
    boolean
    Whether to log the coordinates of the artifacts captured down to the depth specified.
    boolean
    Whether to log code repository info for the artifacts to be built from source
    boolean
    Whether to log code repository dependency tree.
    boolean
    Whether to log the module GAVs the artifacts to be built belongs to instead of all the complete artifact coordinates to be built.
    boolean
    Whether to log visited non-managed dependencies.
    boolean
    Whether to log the coordinates of the artifacts below the depth specified.
    boolean
    Whether to log the summary at the end.
    boolean
    Whether to log the dependency trees walked down to the depth specified.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    this option isn't used anymore Whether to validate the discovered code repo and tags that are included in the report
    boolean
    Whether verbose dependency graphs should be enabled in the underlying dependency resolver.
    boolean
    Whether to issue a warning in case the SCM location could not be determined or fail with an error (the default behavior).
    boolean
    Whether to warn about errors not being able to resolve top level artifacts or fail the process
     
    Read config from the specified file
    default void
    Persist this configuration to the specified file.
  • Method Details

    • getProductInfo

      ProductInfo getProductInfo()
      Information about the product whose dependencies are to be analyzed. Used primarily when generating SBOMs.
      Returns:
      information about the product whose dependencies are to be analyzed
    • getProjectDir

      Path getProjectDir()
      Project directory
      Returns:
      project directory
    • getProjectBom

      io.quarkus.maven.dependency.ArtifactCoords getProjectBom()
      Project BOM
      Returns:
      project BOM
    • getNonProjectBoms

      List<io.quarkus.maven.dependency.ArtifactCoords> getNonProjectBoms()
      BOMs that should be enforced when resolving dependencies but should not be added as project artifacts.
      Returns:
      BOMs that should be enforced when resolving dependencies but should not be added as project artifacts
    • getProjectArtifacts

      Collection<io.quarkus.maven.dependency.ArtifactCoords> getProjectArtifacts()
      Artifacts that should be used as roots of dependency trees during analysis.
      Returns:
      artifacts that should be used as roots of dependency trees during analysis
    • getIncludeArtifacts

      Collection<io.quarkus.maven.dependency.ArtifactCoords> getIncludeArtifacts()
    • getIncludePatterns

      Collection<io.quarkus.maven.dependency.ArtifactCoords> getIncludePatterns()
      Artifact coordinates patterns that should be included when walking dependency trees.
      Returns:
      artifact coordinates patterns that should be included when walking dependency trees
    • getExcludePatterns

      Collection<io.quarkus.maven.dependency.ArtifactCoords> getExcludePatterns()
      Artifact coordinates patterns that should be skipped along with their dependencies when walking dependency trees.
      Returns:
      artifact coordinates patterns that should be skipped along with their dependencies when walking dependency trees
    • getExcludeScopes

      Collection<String> getExcludeScopes()
      Dependency scopes that should be excluded resolving dependencies of root artifact. If not configured, provided and test scoped dependencies will be excluded by default.
      Returns:
      dependency scopes that should be excluded resolving dependencies of root artifact
    • isIncludeNonManaged

      boolean isIncludeNonManaged()
      Whether to exclude dependencies (and their transitive dependencies) that aren't managed in the BOM. The default is true.
      Returns:
      whether non-managed dependencies should be included
    • isExcludeParentPoms

      boolean isExcludeParentPoms()
      Whether to exclude parent POMs from the list of artifacts to be built from source
      Returns:
      whether to exclude parent POMs
    • isExcludeBomImports

      boolean isExcludeBomImports()
      Whether to exclude BOMs imported in the POMs of artifacts to be built from the list of artifacts to be built from source
      Returns:
      whether to exclude BOM imports
    • getLevel

      int getLevel()
      The depth level of a dependency tree of each supported Quarkus extension to capture. Setting the level to 0 will target the supported extension artifacts themselves. Setting the level to 1, will target the supported extension artifacts plus their direct dependencies. If the level is not specified, the default will be -1, which means all the levels.
      Returns:
      dependency level
    • isVerboseGraphs

      boolean isVerboseGraphs()
      Whether verbose dependency graphs should be enabled in the underlying dependency resolver. This means exposing information about winning nodes during conflict resolution.
      Returns:
      whether verbose dependency graphs are enabled in the resolver
    • isLogArtifactsToBuild

      boolean isLogArtifactsToBuild()
      Whether to log the coordinates of the artifacts captured down to the depth specified. The default is true.
      Returns:
      whether to log complete artifacts coordinates
    • isLogModulesToBuild

      boolean isLogModulesToBuild()
      Whether to log the module GAVs the artifacts to be built belongs to instead of all the complete artifact coordinates to be built. If this option is enabled, it overrides isLogArtifactsToBuild()
      Returns:
      whether to log module coords as GAVs instead of complete artifact coordinates
    • isLogTrees

      boolean isLogTrees()
      Whether to log the dependency trees walked down to the depth specified. The default is false.
      Returns:
      whether to log dependency trees
    • getLogTreesFor

      String getLogTreesFor()
      Comma-separated list of artifacts to log dependency trees for.
      Returns:
      comma-separated list of artifacts to log dependency trees for
    • isLogRemaining

      boolean isLogRemaining()
      Whether to log the coordinates of the artifacts below the depth specified. The default is false.
      Returns:
      whether to log remaining artifacts
    • isLogSummary

      boolean isLogSummary()
      Whether to log the summary at the end. The default is true.
      Returns:
      whether to log summary
    • isLogNonManagedVisitied

      boolean isLogNonManagedVisitied()
      Whether to log visited non-managed dependencies.
      Returns:
      whether to log visited non-managed dependencies
    • isLogCodeRepos

      boolean isLogCodeRepos()
      Whether to log code repository info for the artifacts to be built from source
      Returns:
      whether to log code repositories
    • isLogCodeRepoTree

      boolean isLogCodeRepoTree()
      Whether to log code repository dependency tree.
      Returns:
      whetehr to log code repository dependency tree
    • getRecipeRepos

      List<String> getRecipeRepos()
      A list of build recipe repository URLs
      Returns:
      list of build recipe repository URLs
    • isValidateCodeRepoTags

      @Deprecated(forRemoval=true) boolean isValidateCodeRepoTags()
      Deprecated, for removal: This API element is subject to removal in a future version.
      this option isn't used anymore Whether to validate the discovered code repo and tags that are included in the report
      Returns:
      whether to validate core repos and tags
    • isLegacyScmLocator

      @Deprecated(since="0.0.78") boolean isLegacyScmLocator()
      Deprecated.
      Deprecated in favor of the HACBS SCM locator that performs validation Whether to use the legacy SCM detector.
      Returns:
      whether to use the legacy SCM detector
    • isWarnOnResolutionErrors

      boolean isWarnOnResolutionErrors()
      Whether to warn about errors not being able to resolve top level artifacts or fail the process
      Returns:
      whether to warn on artifact resolution errors
    • isWarnOnMissingScm

      boolean isWarnOnMissingScm()
      Whether to issue a warning in case the SCM location could not be determined or fail with an error (the default behavior).
      Returns:
      whether to fail in case the SCM location could not be determined
    • isIncludeAlreadyBuilt

      boolean isIncludeAlreadyBuilt()
    • isIncludeOptionalDeps

      boolean isIncludeOptionalDeps()
      Whether to include optional dependencies of the root project artifacts
      Returns:
      whether to include optional dependencies of the root project artifacts
    • isGradleJava8

      boolean isGradleJava8()
      Whether to use Java 8 to fetch dependency information from a Gradle project. In case this method returns true, the value of JAVA8_HOME environment variable will be used as the Java 8 home directory.
      Returns:
      whether to use Java 8 to fetch dependency information from a Gradle project
    • getGradleJavaHome

      String getGradleJavaHome()
      Java home directory that should be used when fetching dependency information from a Gradle project.
      Returns:
      Java home directory that should be used when fetching dependency information from a Gradle project.
    • mutable

    • persist

      default void persist(Path p) throws IOException
      Persist this configuration to the specified file.
      Parameters:
      p - Target path
      Throws:
      IOException - if the specified file can not be written to.
    • builder

      Returns:
      a new mutable instance
    • fromFile

      static ProjectDependencyConfig fromFile(Path path) throws IOException
      Read config from the specified file
      Parameters:
      path - File to read from (yaml or json)
      Returns:
      read-only ProjectDependencyConfig object
      Throws:
      IOException - in case of a failure
    • mutableFromFile

      static ProjectDependencyConfig.Mutable mutableFromFile(Path path) throws IOException
      Read config from the specified file
      Parameters:
      path - File to read from (yaml or json)
      Returns:
      mutable ProjectDependencyConfig
      Throws:
      IOException - in case of a failure
    • fromStream

      static ProjectDependencyConfig fromStream(InputStream inputStream) throws IOException
      Read config from an input stream
      Parameters:
      inputStream - input stream to read from
      Returns:
      read-only ProjectDependencyConfig object (empty/default for an empty file)
      Throws:
      IOException - in case of a failure