maven

package
v0.78.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWrongSpec is returned when the Spec has wrong content
	ErrWrongSpec error = errors.New("wrong spec content")

	MavenCentralRepository string = "https://repo1.maven.org/maven2/"
)

Functions

This section is empty.

Types

type Maven

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

Maven defines a resource of kind "maven"

func New

func New(spec interface{}) (*Maven, error)

New returns a reference to a newly initialized Maven object from a Spec or an error if the provided Spec triggers a validation error.

func (*Maven) Changelog

func (m *Maven) Changelog() string

Changelog returns the changelog for this resource, or an empty string if not supported

func (*Maven) Condition

func (m *Maven) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)

Condition tests if a specific version exist on the maven repository

func (*Maven) Source

func (m *Maven) Source(workingDir string, resultSource *result.Source) error

Source return the latest version

func (Maven) Target

func (m Maven) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error

func (Maven) Validate added in v0.33.0

func (m Maven) Validate() error

type Spec

type Spec struct {
	// Deprecated, please specify the Maven url in the repository
	URL string `yaml:",omitempty"`
	// Specifies the maven repository url + name
	Repository string `yaml:",omitempty"`
	// Repositories specifies a list of Maven repository where to look for version. Order matter, version is retrieve from the first repository with the last one being Maven Central.
	Repositories []string `yaml:",omitempty"`
	// Specifies the maven artifact groupID
	GroupID string `yaml:",omitempty"`
	// Specifies the maven artifact artifactID
	ArtifactID string `yaml:",omitempty"`
	// Specifies the maven artifact version
	Version string `yaml:",omitempty"`
	// [S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
}

Spec defines a specification for a "maven" resource parsed from an updatecli manifest file

func (*Spec) Sanitize added in v0.33.0

func (s *Spec) Sanitize() error

Jump to

Keyboard shortcuts

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