maven

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachPomPositions

func AttachPomPositions(g *sdk.Graph, projectDir, relPomPath string)

AttachPomPositions wires pom.xml line numbers into a maven graph. The pom is read from projectDir; relPomPath is the scan-root-relative pom path (e.g. "pom.xml" for the root, "core/pom.xml" for a reactor module) stamped into every recorded position, so multi-module locations stay repo-relative in SARIF and diff annotations.

Types

type Detector

type Detector struct {
	Logger     *zap.Logger
	WorkingDir string
	Fallback   sdk.Detector
}

Detector resolves dependency graphs by invoking a Maven wrapper or Maven itself.

func (Detector) Applicable

func (d Detector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable reports whether the project looks like a Maven project.

func (Detector) Descriptor

func (d Detector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the Maven graph detector.

func (Detector) FallbackDetector

func (d Detector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (Detector) Install

func (d Detector) Install(ctx context.Context, req sdk.DetectionRequest) error

Install prepares Maven dependencies before graph resolution.

func (Detector) PackageManagerSupport

func (d Detector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns Maven package-manager discovery metadata.

func (Detector) Ready

func (d Detector) Ready(ctx context.Context, req sdk.DetectionRequest) error

Ready reports whether a Maven wrapper is present or Maven is installed and a usable Java runtime is available for the request's working directory.

func (Detector) ResolveGraph

func (d Detector) ResolveGraph(ctx context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)

ResolveGraph resolves a Maven dependency graph for the scan engine. A multi-module reactor yields one manifest entry per module (the module's pom.xml plus its reachable dependency subtree) alongside the root entry; single-module projects keep exactly one entry.

Jump to

Keyboard shortcuts

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