java

package
v1.18.2-cn Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Overview

Package java provides a concrete Cataloger implementation for packages relating to the Java language ecosystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArchiveCataloger

func NewArchiveCataloger(cfg ArchiveCatalogerConfig) pkg.Cataloger

NewArchiveCataloger returns a new Java archive cataloger object for detecting packages with archives (jar, war, ear, par, sar, jpi, hpi, and native-image formats)

func NewGradleLockfileCataloger

func NewGradleLockfileCataloger() pkg.Cataloger

NewGradleLockfileCataloger returns a cataloger capable of parsing dependencies from a gradle.lockfile file. Note: Older versions of lockfiles aren't supported yet

func NewJvmDistributionCataloger

func NewJvmDistributionCataloger() pkg.Cataloger

NewJvmDistributionCataloger returns packages representing JDK/JRE installations (of multiple distribution types).

func NewNativeImageCataloger

func NewNativeImageCataloger() pkg.Cataloger

NewNativeImageCataloger returns a new Native Image cataloger object.

func NewPomCataloger

func NewPomCataloger(cfg ArchiveCatalogerConfig) pkg.Cataloger

NewPomCataloger returns a cataloger capable of parsing dependencies from a pom.xml file. Pom files list dependencies that maybe not be locally installed yet.

Types

type ArchiveCatalogerConfig

type ArchiveCatalogerConfig struct {
	cataloging.ArchiveSearchConfig `yaml:",inline" json:"" mapstructure:",squash"`
	UseNetwork                     bool   `yaml:"use-network" json:"use-network" mapstructure:"use-network"`
	UseMavenLocalRepository        bool   `yaml:"use-maven-localrepository" json:"use-maven-localrepository" mapstructure:"use-maven-localrepository"`
	MavenLocalRepositoryDir        string `yaml:"maven-localrepository-dir" json:"maven-localrepository-dir" mapstructure:"maven-localrepository-dir"`
	MavenBaseURL                   string `yaml:"maven-base-url" json:"maven-base-url" mapstructure:"maven-base-url"`
	MaxParentRecursiveDepth        int    `yaml:"max-parent-recursive-depth" json:"max-parent-recursive-depth" mapstructure:"max-parent-recursive-depth"`
	ResolveTransitiveDependencies  bool   `yaml:"resolve-transitive-dependencies" json:"resolve-transitive-dependencies" mapstructure:"resolve-transitive-dependencies"`
}

func DefaultArchiveCatalogerConfig

func DefaultArchiveCatalogerConfig() ArchiveCatalogerConfig

func (ArchiveCatalogerConfig) WithArchiveTraversal

func (j ArchiveCatalogerConfig) WithArchiveTraversal(search cataloging.ArchiveSearchConfig, maxDepth int) ArchiveCatalogerConfig

func (ArchiveCatalogerConfig) WithMavenBaseURL

func (j ArchiveCatalogerConfig) WithMavenBaseURL(input string) ArchiveCatalogerConfig

func (ArchiveCatalogerConfig) WithMavenLocalRepositoryDir

func (j ArchiveCatalogerConfig) WithMavenLocalRepositoryDir(input string) ArchiveCatalogerConfig

func (ArchiveCatalogerConfig) WithResolveTransitiveDependencies

func (j ArchiveCatalogerConfig) WithResolveTransitiveDependencies(resolveTransitiveDependencies bool) ArchiveCatalogerConfig

func (ArchiveCatalogerConfig) WithUseMavenLocalRepository

func (j ArchiveCatalogerConfig) WithUseMavenLocalRepository(input bool) ArchiveCatalogerConfig

func (ArchiveCatalogerConfig) WithUseNetwork

func (j ArchiveCatalogerConfig) WithUseNetwork(input bool) ArchiveCatalogerConfig

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL