maven

package
v0.7.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MavenArtifact

type MavenArtifact struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

MavenArtifact implements Dependency for Maven builds

func (MavenArtifact) Dependencies

func (m MavenArtifact) Dependencies() []module.Dependency

Dependencies is not implemented for MavenArtifact

func (MavenArtifact) Fetcher

func (m MavenArtifact) Fetcher() string

Fetcher always returns mvn for MavenArtifact

func (MavenArtifact) Package

func (m MavenArtifact) Package() string

Package returns the package spec for MavenArtifact

func (MavenArtifact) Revision

func (m MavenArtifact) Revision() string

Revision returns the version spec for MavenArtifact

type MavenBuilder

type MavenBuilder struct {
	JavaCmd     string
	JavaVersion string

	MvnCmd     string
	MvnVersion string
}

MavenBuilder implements Builder for Apache Maven (*.pom.xml) builds

func (*MavenBuilder) Analyze

func (builder *MavenBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze parses the output of `mvn dependency:list`

func (*MavenBuilder) Build

func (builder *MavenBuilder) Build(m module.Module, force bool) error

Build runs `mvn install -DskipTests -Drat.skip=true` and cleans with `mvn clean`

func (*MavenBuilder) DiscoverModules

func (builder *MavenBuilder) DiscoverModules(dir string) ([]module.Config, error)

DiscoverModules finds either a root pom.xml file or all pom.xmls in the specified dir

func (*MavenBuilder) Initialize

func (builder *MavenBuilder) Initialize() error

Initialize collects metadata on Java and Maven binaries

func (*MavenBuilder) IsBuilt

func (builder *MavenBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks whether `mvn dependency:list` produces output.

func (*MavenBuilder) IsModule

func (builder *MavenBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type POMFile

type POMFile struct {
	XMLName     xml.Name `xml:"project"`
	ArtifactID  string   `xml:"artifactId"`
	GroupID     string   `xml:"groupId"`
	Version     string   `xml:"version"`
	Description string   `xml:"description"`
	Name        string   `xml:"name"`
	URL         string   `xml:"url"`
}

POMFile represents the schema of a common pom.xml file

Jump to

Keyboard shortcuts

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