maven

package
v1.67.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAndCopySettingsFiles added in v1.62.0

func DownloadAndCopySettingsFiles(globalSettingsFile string, projectSettingsFile string, fileUtils piperutils.FileUtils, httpClient SettingsDownloadUtils) error

func DownloadAndGetMavenParameters added in v1.62.0

func DownloadAndGetMavenParameters(globalSettingsFile string, projectSettingsFile string, fileUtils piperutils.FileUtils, httpClient SettingsDownloadUtils) ([]string, error)

func Evaluate added in v1.17.0

func Evaluate(options *EvaluateOptions, expression string, command mavenExecRunner) (string, error)

Evaluate constructs ExecuteOptions for using the maven-help-plugin's 'evaluate' goal to evaluate a given expression from a pom file. This allows to retrieve the value of - for example - 'project.version' from a pom file exactly as Maven itself evaluates it.

func Execute

func Execute(options *ExecuteOptions, command mavenExecRunner) (string, error)

Execute constructs a mvn command line from the given options, and uses the provided mavenExecRunner to execute it.

func GetTestModulesExcludes added in v1.16.0

func GetTestModulesExcludes() []string

func InstallFile added in v1.44.0

func InstallFile(file, pomFile, m2Path string, command mavenExecRunner) error

InstallFile installs a maven artifact and its pom into the local maven repository. If "file" is empty, only the pom is installed. "pomFile" must not be empty.

func InstallMavenArtifacts added in v1.44.0

func InstallMavenArtifacts(command mavenExecRunner, options EvaluateOptions) error

InstallMavenArtifacts finds maven modules (identified by pom.xml files) and installs the artifacts into the local maven repository.

Types

type EvaluateOptions added in v1.43.0

type EvaluateOptions struct {
	PomPath             string   `json:"pomPath,omitempty"`
	ProjectSettingsFile string   `json:"projectSettingsFile,omitempty"`
	GlobalSettingsFile  string   `json:"globalSettingsFile,omitempty"`
	M2Path              string   `json:"m2Path,omitempty"`
	Defines             []string `json:"defines,omitempty"`
}

EvaluateOptions are used by Evaluate() to construct the Maven command line. In contrast to ExecuteOptions, fewer settings are required for Evaluate and thus a separate type is needed.

type ExecuteOptions

type ExecuteOptions struct {
	PomPath                     string   `json:"pomPath,omitempty"`
	ProjectSettingsFile         string   `json:"projectSettingsFile,omitempty"`
	GlobalSettingsFile          string   `json:"globalSettingsFile,omitempty"`
	M2Path                      string   `json:"m2Path,omitempty"`
	Goals                       []string `json:"goals,omitempty"`
	Defines                     []string `json:"defines,omitempty"`
	Flags                       []string `json:"flags,omitempty"`
	LogSuccessfulMavenTransfers bool     `json:"logSuccessfulMavenTransfers,omitempty"`
	ReturnStdout                bool     `json:"returnStdout,omitempty"`
}

ExecuteOptions are used by Execute() to construct the Maven command line.

type SettingsDownloadUtils added in v1.62.0

type SettingsDownloadUtils interface {
	DownloadFile(url, filename string, header http.Header, cookies []*http.Cookie) error
}

Jump to

Keyboard shortcuts

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