pom

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type POM

type POM struct {
	Content *PomXML
}

func (POM) Licenses

func (p POM) Licenses() []string

func (POM) ListProperties

func (p POM) ListProperties(val reflect.Value) map[string]string

func (POM) ProjectProperties

func (p POM) ProjectProperties() map[string]string

func (POM) Properties

func (p POM) Properties() Properties

func (POM) Repositories

func (p POM) Repositories() []string

type PomDependencies

type PomDependencies struct {
	Text       string          `xml:",chardata"`
	Dependency []PomDependency `xml:"dependency"`
}

type PomDependency

type PomDependency struct {
	Text       string        `xml:",chardata"`
	GroupID    string        `xml:"groupId"`
	ArtifactID string        `xml:"artifactId"`
	Version    string        `xml:"version"`
	Scope      string        `xml:"scope"`
	Optional   bool          `xml:"optional"`
	Exclusions PomExclusions `xml:"exclusions"`
}

func (PomDependency) Name

func (d PomDependency) Name() string

func (PomDependency) Resolve

func (d PomDependency) Resolve(props map[string]string, depManagement, rootDepManagement []PomDependency) PomDependency

Resolve evaluates variables in the dependency and inherit some fields from dependencyManagement to the dependency.

type PomExclusion

type PomExclusion struct {
	GroupID    string `xml:"groupId"`
	ArtifactID string `xml:"artifactId"`
}

ref. https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

type PomExclusions

type PomExclusions struct {
	Text      string         `xml:",chardata"`
	Exclusion []PomExclusion `xml:"exclusion"`
}

type PomLicense

type PomLicense struct {
	Name string `xml:"name"`
}

type PomLicenses

type PomLicenses struct {
	Text    string       `xml:",chardata"`
	License []PomLicense `xml:"license"`
}

type PomParent

type PomParent struct {
	GroupId      string `xml:"groupId"`
	ArtifactId   string `xml:"artifactId"`
	Version      string `xml:"version"`
	RelativePath string `xml:"relativePath"`
}

type PomXML

type PomXML struct {
	Parent     PomParent   `xml:"parent"`
	GroupId    string      `xml:"groupId"`
	ArtifactId string      `xml:"artifactId"`
	Version    string      `xml:"version"`
	Licenses   PomLicenses `xml:"licenses"`
	Modules    struct {
		Text   string   `xml:",chardata"`
		Module []string `xml:"module"`
	} `xml:"modules"`
	Properties           Properties `xml:"properties"`
	DependencyManagement struct {
		Text         string          `xml:",chardata"`
		Dependencies PomDependencies `xml:"dependencies"`
	} `xml:"dependencyManagement"`
	Dependencies PomDependencies `xml:"dependencies"`
	Repositories struct {
		Text       string `xml:",chardata"`
		Repository []struct {
			Text     string `xml:",chardata"`
			ID       string `xml:"id"`
			Name     string `xml:"name"`
			URL      string `xml:"url"`
			Releases struct {
				Text    string `xml:",chardata"`
				Enabled string `xml:"enabled"`
			} `xml:"releases"`
			Snapshots struct {
				Text    string `xml:",chardata"`
				Enabled string `xml:"enabled"`
			} `xml:"snapshots"`
		} `xml:"repository"`
	} `xml:"repositories"`
}

type Properties

type Properties map[string]string

func (*Properties) UnmarshalXML

func (props *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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