java

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package java implements the Maven-based Java ecosystem.Ecosystem, backed by omnibump's MavenAnalyzer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ecosystem

type Ecosystem struct {
	// contains filtered or unexported fields
}

Ecosystem implements ecosystem.Ecosystem for Maven-based Java projects. Gradle is not analyzed: a Gradle project is reachable through a bump step's with.language: java, but its modroot (no pom.xml, a Gradle build file) is skipped - see UnsupportedBuildMarkers.

Known limitation: omnibump's Maven analyzer resolves properties declared in a <parent> POM's chain, but only within the files it's given - and CHOAM fetches only the modroot's own pom.xml (no parent chase). A dependency whose version is a property defined solely in an unfetched parent POM is skipped rather than mis-scanned.

func New

func New() *Ecosystem

New creates the Java (Maven) ecosystem implementation.

func (*Ecosystem) Analyze

func (e *Ecosystem) Analyze(ctx context.Context, files map[string][]byte) (*ecosystem.ModuleDeps, error)

func (*Ecosystem) BumpCoords

func (e *Ecosystem) BumpCoords(_ context.Context, bumps []scan.SecurityBump, deps *ecosystem.ModuleDeps) map[string]scan.SecurityBump

BumpCoords maps each OSV bump (named "groupId:artifactId", colon) to the "groupId@artifactId" coordinate the rendered Maven grammar uses, resolved from this modroot's own pom.xml entries when present (matching FilterBumps' rendering exactly). A bump for a coordinate absent from the pom falls back to a plain colon->at-sign substitution - FilterBumps drops such entries anyway, so the unmatched key is harmless.

func (*Ecosystem) FilterBumps

func (e *Ecosystem) FilterBumps(_ context.Context, existing []string, bumps []scan.SecurityBump, deps *ecosystem.ModuleDeps) ([]string, []ecosystem.HeldBump)

FilterBumps keeps a candidate bump only when its groupId:artifactId coordinate is present in this modroot's pom.xml and the candidate version is newer than what's currently declared, per Maven's (non-semver) version ordering. An existing entry above an advisory's fix is kept (never lowered), and a fix in another major version than the declared one (the first numeric segment) is held back, never written. Rendered entries use the "groupId@artifactId@version" grammar the melange bump pipeline expects for Maven.

func (*Ecosystem) ManifestFiles

func (e *Ecosystem) ManifestFiles() (required, optional []string)

func (*Ecosystem) Name

func (e *Ecosystem) Name() string

func (*Ecosystem) ScanPackages

func (e *Ecosystem) ScanPackages(_ context.Context, deps *ecosystem.ModuleDeps) []scan.Package

func (*Ecosystem) UnsupportedBuildMarkers added in v0.6.0

func (e *Ecosystem) UnsupportedBuildMarkers() (reason string, markers []string)

UnsupportedBuildMarkers implements ecosystem.UnsupportedBuild: a modroot with no pom.xml but a Gradle build file is skipped, not an error.

Jump to

Keyboard shortcuts

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