maven

package
v0.0.0-...-6afa144 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

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

func NewCrawler

func NewCrawler(opts ...Option) *Crawler

func (*Crawler) DetectSrc

func (c *Crawler) DetectSrc(_ context.Context, pkg config.Package) (*url.URL, error)

DetectSrc detects the source repository URL of the package. It fetches the latest version and POM file to extract the repository URL as we didn't find a way to get the repository URL directly from the metadata.

type Metadata

type Metadata struct {
	Versioning Versioning `xml:"versioning"`
}

Metadata represents maven-metadata.xml

type Option

type Option func(*Crawler)

func WithURL

func WithURL(url string) Option

type POM

type POM struct {
	XMLName xml.Name `xml:"project"`
	SCM     Scm      `xml:"scm"`
	URL     string   `xml:"url"`
}

POM represents pom.xml

type Scm

type Scm struct {
	URL string `xml:"url"`
}

type Versioning

type Versioning struct {
	Latest string `xml:"latest"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳