maven

package
v0.0.0-...-0ebeaae Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCoordinate        = errors.New(`invalid coordinate`)
	ErrSnapshotRequiresMetadata = errors.New(`snapshot resolution requires passing metadata`)
)
View Source
var (
	ErrSnapshotsNotAllowed = SkipResolutionError("Snapshots not resolvable from this repository")
	ErrUnsupportedScheme   = errors.New(`unsupported scheme`)
	ErrBadStatus           = errors.New(`bad HTTP status`)
)

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Coordinate Coordinate
	URL        *url.URL
	// contains filtered or unexported fields
}

func (Artifact) Fetch

func (a Artifact) Fetch() (io.ReadCloser, error)

type Coordinate

type Coordinate struct {
	GroupId    string
	ArtifactId string
	Packaging  string
	Classifier string
	Version    string
}

func CoordinateFromString

func CoordinateFromString(s string) (Coordinate, error)

func (Coordinate) IsSnapshot

func (c Coordinate) IsSnapshot() bool

func (Coordinate) String

func (c Coordinate) String() string

type MavenMetadata

type MavenMetadata struct {
	XMLName    xml.Name `xml:"metadata"`
	GroupId    string   `xml:"groupId"`
	ArtifactId string   `xml:"artifactId"`
	Version    string   `xml:"version"`
	Versioning struct {
		Snapshot struct {
			Timestamp   string `xml:"timestamp"`
			BuildNumber int    `xml:"buildNumber"`
		} `xml:"snapshot"`
		Versions    []string `xml:"versions>version"`
		LastUpdated string   `xml:"lastUpdated"`
		Release     string   `xml:"release"`
	} `xml:"versioning"`
}

type RemoteRepository

type RemoteRepository struct {
	URL                 *url.URL
	MayResolveSnapshots bool
}

func (RemoteRepository) Resolve

func (r RemoteRepository) Resolve(c Coordinate) (*Artifact, error)

func (RemoteRepository) VersionsForCoordinate

func (r RemoteRepository) VersionsForCoordinate(c Coordinate) ([]Coordinate, error)

type Repository

type Repository interface {
	Resolve(Coordinate) (*Artifact, error)
	VersionsForCoordinate(Coordinate) ([]Coordinate, error)
	// contains filtered or unexported methods
}

type SkipResolutionError

type SkipResolutionError string

func (SkipResolutionError) Error

func (s SkipResolutionError) Error() string

Jump to

Keyboard shortcuts

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