Documentation
¶
Index ¶
- Constants
- func GetDependencyManagement(ctx context.Context, client *datasource.MavenRegistryAPIClient, ...) (maven.DependencyManagement, error)
- func MergeParents(ctx context.Context, mavenClient *datasource.MavenRegistryAPIClient, ...) error
- func ParentPOMPath(currentPath, relativePath string) string
- func ProjectKey(proj maven.Project) maven.ProjectKey
Constants ¶
const ( OriginManagement = "management" OriginParent = "parent" OriginPlugin = "plugin" OriginProfile = "profile" )
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 ¶
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.