maven

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBuildDirectory added in v0.12.0

func GetBuildDirectory(projectDir string) (string, error)

Types

type Builder

type Builder struct {
	*BuilderOptions
}

func NewBuilder

func NewBuilder(opts *BuilderOptions) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(targetClass string, targetMethod string) (*build.Result, error)

type BuilderOptions

type BuilderOptions struct {
	ProjectDir string
	Parallel   ParallelOptions
	Stdout     io.Writer
	Stderr     io.Writer
}

func (*BuilderOptions) Validate

func (opts *BuilderOptions) Validate() error

type ParallelOptions

type ParallelOptions struct {
	Enabled bool
	NumJobs uint
}

type Project added in v0.10.0

type Project struct {
	XMLName     xml.Name `xml:"project"`
	GroupId     string   `xml:"groupId"`
	Version     string   `xml:"version"`
	Name        string   `xml:"name"`
	Description string   `xml:"description"`
	Properties  struct {
		Text                string `xml:",chardata"`
		MavenCompilerTarget string `xml:"maven.compiler.target"`
		MavenCompilerSource string `xml:"maven.compiler.source"`
	} `xml:"properties"`
	Dependencies struct {
		Dependency []struct {
			GroupId    string `xml:"groupId"`
			ArtifactId string `xml:"artifactId"`
			Version    string `xml:"version"`
			Scope      string `xml:"scope"`
		} `xml:"dependency"`
	} `xml:"dependencies"`
	Build struct {
		SourceDirectory       string `xml:"sourceDirectory"`
		ScriptSourceDirectory string `xml:"scriptSourceDirectory"`
		TestSourceDirectory   string `xml:"testSourceDirectory"`
		OutputDirectory       string `xml:"outputDirectory"`
		TestOutputDirectory   string `xml:"testOutputDirectory"`
		Resources             struct {
			Resource []Resource `xml:"resource"`
		} `xml:"resources"`
		TestResources struct {
			TestResource []Resource `xml:"testResource"`
		} `xml:"testResources"`
		Directory string `xml:"directory"`
	} `xml:"build"`
	Reporting struct {
		OutputDirectory string `xml:"outputDirectory"`
	} `xml:"reporting"`
}

this struct is a abbreviated representation of an actual pom.xml

type Resource added in v0.10.0

type Resource struct {
	Directory string `xml:"directory"`
}

Jump to

Keyboard shortcuts

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