maven

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PomXMLFileName string = "pom.xml"

PomXMLFileName represents the name of the POM File

Variables

This section is empty.

Functions

This section is empty.

Types

type Activation

type Activation struct {
	ActiveByDefault bool                `xml:"activeByDefault,omitempty"`
	JDK             string              `xml:"jdk,omitempty"`
	OS              *ActivationOS       `xml:"os,omitempty"`
	Property        *ActivationProperty `xml:"property,omitempty"`
	File            *ActivationFile     `xml:"file,omitempty"`
}

Activation defines a pom.xml Activation

type ActivationFile

type ActivationFile struct {
	Missing string `xml:"missing,omitempty"`
	Exists  string `xml:"exists,omitempty"`
}

ActivationFile defines a pom.xml ActivationFile

type ActivationOS

type ActivationOS struct {
	Name    string `xml:"name,omitempty"`
	Family  string `xml:"family,omitempty"`
	Arch    string `xml:"arch,omitempty"`
	Version string `xml:"version,omitempty"`
}

ActivationOS defines a pom.xml ActivationOS

type ActivationProperty

type ActivationProperty struct {
	Name  string `xml:"name,omitempty"`
	Value string `xml:"value,omitempty"`
}

ActivationProperty defines a pom.xml ActivationProperty

type Build

type Build struct {
	SourceDirectory       string       `xml:"sourceDirectory,omitempty"`
	ScriptSourceDirectory string       `xml:"scriptSourceDirectory,omitempty"`
	TestSourceDirectory   string       `xml:"testSourceDirectory,omitempty"`
	OutputDirectory       string       `xml:"outputDirectory,omitempty"`
	TestOutputDirectory   string       `xml:"testOutputDirectory,omitempty"`
	Extensions            *[]Extension `xml:"extensions>extension,omitempty"`
	BuildBase
}

Build defines a pom.xml Build

type BuildBase

type BuildBase struct {
	DefaultGoal      string            `xml:"defaultGoal,omitempty"`
	Resources        *[]Resource       `xml:"resources>resource,omitempty"`
	TestResources    *[]Resource       `xml:"testResources>testResource,omitempty"`
	Directory        string            `xml:"directory,omitempty"`
	FinalName        string            `xml:"finalName,omitempty"`
	Filters          *[]string         `xml:"filters>filter,omitempty"`
	PluginManagement *PluginManagement `xml:"pluginManagement,omitempty"`
	Plugins          *[]Plugin         `xml:"plugins>plugin,omitempty"`
}

BuildBase defines a pom.xml BuildBase

type CIManagement

type CIManagement struct {
	System    string     `xml:"system,omitempty"`
	URL       string     `xml:"url,omitempty"`
	Notifiers []Notifier `xml:"notifiers>notifier,omitempty"`
}

CIManagement defines a pom.xml CIManagement

type Configuration

type Configuration struct {
	Classifier            string    `xml:"classifier,omitempty"`
	Source                string    `xml:"source,omitempty"`
	Target                string    `xml:"target,omitempty"`
	ConfigurationProfiles *[]string `xml:"profiles>profile,omitempty"`
	FinalName             string    `xml:"finalName,omitempty"`
}

Configuration defines a pom.xml Configuration TODO: change this to map[string]interface{} because different plugins have different configuration https://maven.apache.org/guides/mini/guide-configuring-plugins.html

type Contributor

type Contributor struct {
	Name            string     `xml:"name,omitempty"`
	Email           string     `xml:"email,omitempty"`
	URL             string     `xml:"url,omitempty"`
	Organization    string     `xml:"organization,omitempty"`
	OrganizationURL string     `xml:"organizationUrl,omitempty"`
	Roles           *[]string  `xml:"roles>role,omitempty"`
	Timezone        string     `xml:"timezone,omitempty"`
	Properties      Properties `xml:"properties,omitempty"`
}

Contributor defines a pom.xml Contributor

type Dependency

type Dependency struct {
	GroupID    string       `xml:"groupId,omitempty"`
	ArtifactID string       `xml:"artifactId,omitempty"`
	Version    string       `xml:"version,omitempty"`
	Type       string       `xml:"type,omitempty"`
	Classifier string       `xml:"classifier,omitempty"`
	Scope      string       `xml:"scope,omitempty"`
	SystemPath string       `xml:"systemPath,omitempty"`
	Exclusions *[]Exclusion `xml:"exclusions>exclusion,omitempty"`
	Optional   string       `xml:"optional,omitempty"`
}

Dependency defines a pom.xml Dependency

type DependencyManagement

type DependencyManagement struct {
	Dependencies *[]Dependency `xml:"dependencies>dependency,omitempty"`
}

DependencyManagement defines a pom.xml DependencyManagement

type Developer

type Developer struct {
	ID              string     `xml:"id,omitempty"`
	Name            string     `xml:"name,omitempty"`
	Email           string     `xml:"email,omitempty"`
	URL             string     `xml:"url,omitempty"`
	Organization    string     `xml:"organization,omitempty"`
	OrganizationURL string     `xml:"organizationUrl,omitempty"`
	Roles           *[]string  `xml:"roles>role,omitempty"`
	Timezone        string     `xml:"timezone,omitempty"`
	Properties      Properties `xml:"properties,omitempty"`
}

Developer defines a pom.xml Developer

type DistributionManagement

type DistributionManagement struct {
	Repository         Repository `xml:"repository,omitempty"`
	SnapshotRepository Repository `xml:"snapshotRepository,omitempty"`
	Site               Site       `xml:"site,omitempty"`
	DownloadURL        string     `xml:"downloadUrl,omitempty"`
	Relocation         Relocation `xml:"relocation,omitempty"`
	Status             string     `xml:"status,omitempty"`
}

DistributionManagement defines a pom.xml DistributionManagement

type Entries

type Entries map[string]string

Entries defines a pom.xml entry

func (Entries) MarshalXML

func (entries Entries) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals XML

type Exclusion

type Exclusion struct {
	ArtifactID string `xml:"artifactId,omitempty"`
	GroupID    string `xml:"groupId,omitempty"`
}

Exclusion defines a pom.xml Exclusion

type Extension

type Extension struct {
	GroupID    string `xml:"groupId,omitempty"`
	ArtifactID string `xml:"artifactId,omitempty"`
	Version    string `xml:"version,omitempty"`
}

Extension defines a pom.xml Extension

type IssueManagement

type IssueManagement struct {
	System string `xml:"system,omitempty"`
	URL    string `xml:"url,omitempty"`
}

IssueManagement defines a pom.xml IssueManagement

type License

type License struct {
	Name         string `xml:"name,omitempty"`
	URL          string `xml:"url,omitempty"`
	Distribution string `xml:"distribution,omitempty"`
	Comments     string `xml:"comments,omitempty"`
}

License defines a pom.xml License

type MailingList

type MailingList struct {
	Name          string    `xml:"name,omitempty"`
	Subscribe     string    `xml:"subscribe,omitempty"`
	Unsubscribe   string    `xml:"unsubscribe,omitempty"`
	Post          string    `xml:"post,omitempty"`
	Archive       string    `xml:"archive,omitempty"`
	OtherArchives *[]string `xml:"otherArchives>otherArchive,omitempty"`
}

MailingList defines a pom.xml MailingList

type Notifier

type Notifier struct {
	Type          string     `xml:"type,omitempty"`
	SendOnError   bool       `xml:"sendOnError,omitempty"`
	SendOnFailure bool       `xml:"sendOnFailure,omitempty"`
	SendOnSuccess bool       `xml:"sendOnSuccess,omitempty"`
	SendOnWarning bool       `xml:"sendOnWarning,omitempty"`
	Address       string     `xml:"address,omitempty"`
	Configuration Properties `xml:"configuration,omitempty"`
}

Notifier defines a pom.xml Notifier

type Organization

type Organization struct {
	Name string `xml:"name,omitempty"`
	URL  string `xml:"url,omitempty"`
}

Organization defines a pom.xml Organization

type Parent

type Parent struct {
	GroupID      string `xml:"groupId,omitempty"`
	ArtifactID   string `xml:"artifactId,omitempty"`
	Version      string `xml:"version,omitempty"`
	RelativePath string `xml:"relativePath,omitempty"`
}

Parent defines a pom.xml parent

type Plugin

type Plugin struct {
	GroupID       string             `xml:"groupId,omitempty"`
	ArtifactID    string             `xml:"artifactId,omitempty"`
	Version       string             `xml:"version,omitempty"`
	Extensions    string             `xml:"extensions,omitempty"`
	Executions    *[]PluginExecution `xml:"executions>execution,omitempty"`
	Dependencies  *[]Dependency      `xml:"dependencies>dependency,omitempty"`
	Inherited     string             `xml:"inherited,omitempty"`
	Configuration Configuration      `xml:"configuration,omitempty"`
}

Plugin defines a pom.xml Plugin

type PluginExecution

type PluginExecution struct {
	ID        string    `xml:"id,omitempty"`
	Phase     string    `xml:"phase,omitempty"`
	Goals     *[]string `xml:"goals>goal,omitempty"`
	Inherited string    `xml:"inherited,omitempty"`
}

PluginExecution defines a pom.xml PluginExecution

type PluginManagement

type PluginManagement struct {
	Plugins *[]Plugin `xml:"plugins>plugin,omitempty"`
}

PluginManagement defines a pom.xml PluginManagement

type PluginRepository

type PluginRepository struct {
	Releases  *RepositoryPolicy `xml:"releases,omitempty"`
	Snapshots *RepositoryPolicy `xml:"snapshots,omitempty"`
	ID        string            `xml:"id,omitempty"`
	Name      string            `xml:"name,omitempty"`
	URL       string            `xml:"url,omitempty"`
	Layout    string            `xml:"layout,omitempty"`
}

PluginRepository defines a pom.xml PluginRepository

type Pom

type Pom struct {
	XMLName                xml.Name                `xml:"project,omitempty"`
	ModelVersion           string                  `xml:"modelVersion,omitempty"`
	Parent                 *Parent                 `xml:"parent,omitempty"`
	GroupID                string                  `xml:"groupId,omitempty"`
	ArtifactID             string                  `xml:"artifactId,omitempty"`
	Version                string                  `xml:"version,omitempty"`
	Packaging              string                  `xml:"packaging,omitempty"`
	Name                   string                  `xml:"name,omitempty"`
	Description            string                  `xml:"description,omitempty"`
	URL                    string                  `xml:"url,omitempty"`
	InceptionYear          string                  `xml:"inceptionYear,omitempty"`
	Organization           *Organization           `xml:"organization,omitempty"`
	Licenses               *[]License              `xml:"licenses>license,omitempty"`
	Developers             *[]Developer            `xml:"developers>developer,omitempty"`
	Contributors           *[]Contributor          `xml:"contributors>contributor,omitempty"`
	MailingLists           *[]MailingList          `xml:"mailingLists>mailingList,omitempty"`
	Prerequisites          *Prerequisites          `xml:"prerequisites,omitempty"`
	Modules                *[]string               `xml:"modules>module,omitempty"`
	SCM                    *Scm                    `xml:"scm,omitempty"`
	IssueManagement        *IssueManagement        `xml:"issueManagement,omitempty"`
	CIManagement           *CIManagement           `xml:"ciManagement,omitempty"`
	DistributionManagement *DistributionManagement `xml:"distributionManagement,omitempty"`
	DependencyManagement   *DependencyManagement   `xml:"dependencyManagement,omitempty"`
	Dependencies           *[]Dependency           `xml:"dependencies>dependency,omitempty"`
	Repositories           *[]Repository           `xml:"repositories>repository,omitempty"`
	PluginRepositories     *[]PluginRepository     `xml:"pluginRepositories>pluginRepository,omitempty"`
	Build                  *Build                  `xml:"build,omitempty"`
	Reporting              *Reporting              `xml:"reporting,omitempty"`
	Profiles               *[]Profile              `xml:"profiles>profile,omitempty"`
	Properties             *Properties             `xml:"properties,omitempty"`
}

Pom defines pom.xml data

func (*Pom) GetProperty

func (pom *Pom) GetProperty(key string) (val string, err error)

GetProperty returns the property value of a property

func (*Pom) Load

func (pom *Pom) Load(file string) error

Load loads a pom xml file

type Prerequisites

type Prerequisites struct {
	Maven string `xml:"maven,omitempty"`
}

Prerequisites defines a pom.xml Prerequisites

type Profile

type Profile struct {
	ID                     string                  `xml:"id,omitempty"`
	Activation             *Activation             `xml:"activation,omitempty"`
	Build                  *BuildBase              `xml:"build,omitempty"`
	Modules                *[]string               `xml:"modules>module,omitempty"`
	DistributionManagement *DistributionManagement `xml:"distributionManagement,omitempty"`
	Properties             *Properties             `xml:"properties,omitempty"`
	DependencyManagement   *DependencyManagement   `xml:"dependencyManagement,omitempty"`
	Dependencies           *[]Dependency           `xml:"dependencies>dependency,omitempty"`
	Repositories           *[]Repository           `xml:"repositories>repository,omitempty"`
	PluginRepositories     *[]PluginRepository     `xml:"pluginRepositories>pluginRepository,omitempty"`
	Reporting              *Reporting              `xml:"reporting,omitempty"`
}

Profile defines a pom.xml Profile

type Properties

type Properties struct {
	Entries Entries
}

Properties defines pom.xml properties

func (*Properties) UnmarshalXML

func (p *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

UnmarshalXML unmarshals XML

type Relocation

type Relocation struct {
	GroupID    string `xml:"groupId,omitempty"`
	ArtifactID string `xml:"artifactId,omitempty"`
	Version    string `xml:"version,omitempty"`
	Message    string `xml:"message,omitempty"`
}

Relocation defines a pom.xml Relocation

type ReportSet

type ReportSet struct {
	ID        string    `xml:"id,omitempty"`
	Reports   *[]string `xml:"reports>report,omitempty"`
	Inherited string    `xml:"inherited,omitempty"`
}

ReportSet defines a pom.xml ReportSet

type Reporting

type Reporting struct {
	ExcludeDefaults string             `xml:"excludeDefaults,omitempty"`
	OutputDirectory string             `xml:"outputDirectory,omitempty"`
	Plugins         *[]ReportingPlugin `xml:"plugins>plugin,omitempty"`
}

Reporting defines a pom.xml Reporting

type ReportingPlugin

type ReportingPlugin struct {
	GroupID    string       `xml:"groupId,omitempty"`
	ArtifactID string       `xml:"artifactId,omitempty"`
	Version    string       `xml:"version,omitempty"`
	Inherited  string       `xml:"inherited,omitempty"`
	ReportSets *[]ReportSet `xml:"reportSets>reportSet,omitempty"`
}

ReportingPlugin defines a pom.xml ReportingPlugin

type Repository

type Repository struct {
	UniqueVersion bool              `xml:"uniqueVersion,omitempty"`
	Releases      *RepositoryPolicy `xml:"releases,omitempty"`
	Snapshots     *RepositoryPolicy `xml:"snapshots,omitempty"`
	ID            string            `xml:"id,omitempty"`
	Name          string            `xml:"name,omitempty"`
	URL           string            `xml:"url,omitempty"`
	Layout        string            `xml:"layout,omitempty"`
}

Repository defines a pom.xml Repository

type RepositoryPolicy

type RepositoryPolicy struct {
	Enabled        string `xml:"enabled,omitempty"`
	UpdatePolicy   string `xml:"updatePolicy,omitempty"`
	ChecksumPolicy string `xml:"checksumPolicy,omitempty"`
}

RepositoryPolicy defines a pom.xml RepositoryPolicy

type Resource

type Resource struct {
	TargetPath string    `xml:"targetPath,omitempty"`
	Filtering  string    `xml:"filtering,omitempty"`
	Directory  string    `xml:"directory,omitempty"`
	Includes   *[]string `xml:"includes>include,omitempty"`
	Excludes   *[]string `xml:"excludes>exclude,omitempty"`
}

Resource defines a pom.xml Resource

type Scm

type Scm struct {
	Connection          string `xml:"connection,omitempty"`
	DeveloperConnection string `xml:"developerConnection,omitempty"`
	Tag                 string `xml:"tag,omitempty"`
	URL                 string `xml:"url,omitempty"`
}

Scm defines a pom.xml Scm

type Site

type Site struct {
	ID   string `xml:"id,omitempty"`
	Name string `xml:"name,omitempty"`
	URL  string `xml:"url,omitempty"`
}

Site defines a pom.xml Site

Jump to

Keyboard shortcuts

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