maven

package
v0.0.0-...-04e40b3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	GroupId    string       `xml:"groupId"`
	ArtifactId string       `xml:"artifactId"`
	Version    string       `xml:"version"`
	Scope      string       `xml:"scope"`
	Optional   bool         `xml:"optional"`
	Exclusions []Dependency `xml:"exclusions>exclusion"`
}

func NewDep

func NewDep(groupId, artifactId, version string) *Dependency

func (*Dependency) JarName

func (d *Dependency) JarName() string

func (*Dependency) Path

func (d *Dependency) Path() string

func (*Dependency) PomName

func (d *Dependency) PomName() string

func (*Dependency) RootName

func (d *Dependency) RootName() string

func (*Dependency) String

func (d *Dependency) String() string

type Pom

type Pom struct {
	Name                string       `xml:"name"`
	ArtifactId          string       `xml:"artifactId"`
	Packaging           string       `xml:"packaging"`
	Version             string       `xml:"version"` // If no version, use parents'
	Parent              Dependency   `xml:"parent"`
	Dependencies        []Dependency `xml:"dependencies>dependency"`
	ManagedDependencies []Dependency `xml:"dependencyManagement>dependencies>dependency"`
	Props               PropertyList `xml:"properties"`
}

func (*Pom) Deps

func (pom *Pom) Deps() []*Dependency

func (*Pom) GetParent

func (pom *Pom) GetParent() *Dependency

func (*Pom) HasParent

func (pom *Pom) HasParent() bool

func (*Pom) Properties

func (pom *Pom) Properties() map[string]string

type Property

type Property struct {
	XMLName xml.Name `xml:""`
	Value   string   `xml:",chardata"`
}

type PropertyList

type PropertyList struct {
	Property []Property `xml:",any"`
}

type Repo

type Repo struct {
	Host string
	Path string
}

func NewRepo

func NewRepo(host, path string) *Repo

type Resolver

type Resolver struct {
	LocalCache string
	Repos      []*Repo
}

func NewResolver

func NewResolver(repos ...*Repo) *Resolver

func (*Resolver) GetDeps

func (resolver *Resolver) GetDeps(dep *Dependency) []*Dependency

func (*Resolver) GetPom

func (resolver *Resolver) GetPom(uri string) (*Pom, error)

func (*Resolver) GetProperties

func (resolver *Resolver) GetProperties(dep *Dependency) map[string]string

Jump to

Keyboard shortcuts

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