maven

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OriginManagement = "management"
	OriginParent     = "parent"
	OriginPlugin     = "plugin"
	OriginProfile    = "profile"
)
View Source
const MaxParent = 100

MaxParent sets a limit on the number of parents to avoid indefinite loop.

Variables

This section is empty.

Functions

func GetDependencyManagement added in v1.9.1

func GetDependencyManagement(ctx context.Context, client *datasource.MavenRegistryAPIClient, groupID, artifactID, version maven.String) (maven.DependencyManagement, error)

GetDependencyManagement returns managed dependencies in the specified Maven project by fetching remote pom.xml.

func MergeParents

func MergeParents(ctx context.Context, mavenClient *datasource.MavenRegistryAPIClient, result *maven.Project, current maven.Parent, start int, path string, allowLocal bool) error

MergeMavenParents parses local accessible parent pom.xml or fetches it from upstream, merges into root project, then interpolate the properties. result holds the merged Maven project. current holds the current parent project to merge. start indicates the index of the current parent project, which is used to check if the packaging has to be `pom`. allowLocal indicates whether parsing local parent pom.xml is allowed. path holds the path to the current pom.xml, which is used to compute the relative path of parent.

func ParentPOMPath

func ParentPOMPath(currentPath, relativePath string) string

Maven looks for the parent POM first in 'relativePath', then the local repository '../pom.xml', and lastly in the remote repo.

func ProjectKey

func ProjectKey(proj maven.Project) maven.ProjectKey

ProjectKey returns a project key with empty groupId/version filled by corresponding fields in parent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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