maven

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 23 Imported by: 0

Documentation

Overview

Package maven provides the manifest parsing and writing for the Maven pom.xml format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReadWriter

func GetReadWriter(client *datasource.MavenRegistryAPIClient) (manifest.ReadWriter, error)

GetReadWriter returns a ReadWriter for pom.xml manifest files.

Types

type DependencyPatches

type DependencyPatches map[string]map[Patch]bool //  origin -> patch -> whether from this project

DependencyPatches represent the dependencies to be updated, which is a map of dependency patches of each origin.

type DependencyWithOrigin

type DependencyWithOrigin struct {
	maven.Dependency

	Origin string // Origin indicates where the dependency comes from
}

DependencyWithOrigin is a maven dependency with the origin where it comes from.

func OriginalDependency

func OriginalDependency(patch result.PackageUpdate, origDeps []DependencyWithOrigin) DependencyWithOrigin

OriginalDependency returns the original dependency of a dependency patch. If the dependency is not found in any local pom.xml, an empty dependency is returned.

type ManifestSpecific

type ManifestSpecific struct {
	Parent                 maven.Parent
	ParentPaths            []string                     // Paths to the parent pom.xml files
	Properties             []PropertyWithOrigin         // Properties from the base project and any local parent projects
	OriginalRequirements   []DependencyWithOrigin       // Dependencies from the base project
	LocalRequirements      []DependencyWithOrigin       // Dependencies from the base project and any local parent projects
	RequirementsForUpdates []resolve.RequirementVersion // Requirements that we only need for updates
	Repositories           []maven.Repository
}

ManifestSpecific is ecosystem-specific information needed for the pom.xml manifest.

type Patch

type Patch struct {
	maven.DependencyKey

	NewRequire string
}

Patch represents an individual dependency to be upgraded, and the version to upgrade to

type Patches

type Patches struct {
	DependencyPatches DependencyPatches
	PropertyPatches   PropertyPatches
}

Patches represents all the dependencies and properties to be updated

type PropertyPatches

type PropertyPatches map[string]map[string]string // origin -> tag -> value

PropertyPatches represent the properties to be updated, which is a map of properties of each origin.

type PropertyWithOrigin

type PropertyWithOrigin struct {
	maven.Property

	Origin string // Origin indicates where the property comes from
}

PropertyWithOrigin is a maven property with the origin where it comes from.

type RequirementKey

type RequirementKey struct {
	resolve.PackageKey

	ArtifactType string
	Classifier   string
}

RequirementKey is a comparable type that uniquely identifies a package dependency in a manifest.

func MakeRequirementKey

func MakeRequirementKey(requirement resolve.RequirementVersion) RequirementKey

MakeRequirementKey constructs a maven RequirementKey from the given RequirementVersion.

Jump to

Keyboard shortcuts

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