Documentation ¶
Index ¶
- func DeletePom(directory string) error
- func Marshal(model *Project) ([]byte, error)
- func PomExists(directory string) (bool, error)
- type Activation
- type Build
- type CiManagement
- type Configuration
- type Contributors
- type Coordinates
- type Dependencies
- func (d *Dependencies) AddDependencies(deps []*Dependency)
- func (d *Dependencies) AddDependency(dependency *Dependency)
- func (d *Dependencies) GetDependency(c *Coordinates) *Dependency
- func (d *Dependencies) HasDependency(c *Coordinates) bool
- func (d *Dependencies) RemoveDependency(c *Coordinates) *Dependency
- type Dependency
- type DependencyManagement
- type Developers
- type DistributionManagement
- type DistributionRepository
- type Execution
- type Executions
- type Extension
- type Extensions
- type File
- type IssueManagement
- type License
- type Licenses
- type MailingList
- type MailingLists
- type ModelReadWriter
- type ModelReader
- type ModelWriter
- type ModuleArray
- type Notifier
- type Notifiers
- type Organization
- type Os
- type Parent
- type Person
- type Plugin
- type PluginManagement
- type Plugins
- type Pom
- type Prerequisites
- type Profile
- type Profiles
- type Project
- func (p *Project) AddDependencies(d []*Dependency)
- func (p *Project) AddDependency(d *Dependency)
- func (p *Project) AddManagedDependencies(d []*Dependency)
- func (p *Project) AddManagedDependency(d *Dependency)
- func (p *Project) AddModules(modules []string)
- func (p *Project) AddProperties(props map[string]string)
- func (p *Project) AddProperty(k, v string)
- func (p *Project) GetCoordinates() *Coordinates
- func (p *Project) GetDependency(c *Coordinates) *Dependency
- func (p *Project) GetManagedDependency(c *Coordinates) *Dependency
- func (p *Project) HasDependency(c *Coordinates) bool
- func (p *Project) HasManagedDependency(c *Coordinates) bool
- func (p *Project) HasProperty(k string) bool
- func (p *Project) RemoveDependency(c *Coordinates) *Dependency
- func (p *Project) RemoveManagedDependency(c *Coordinates) *Dependency
- func (p *Project) RemoveParent() *Parent
- func (p *Project) SetCoordinates(c *Coordinates)
- func (p *Project) SetParent(parent *Parent)
- type Properties
- func (p *Properties) AddProperties(props map[string]string)
- func (p *Properties) AddProperty(k, v string)
- func (p *Properties) HasProperty(k string) bool
- func (p *Properties) MarshalXML(d *xml.Encoder, start xml.StartElement) (err error)
- func (p *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
- type Property
- type Relocation
- type Reporting
- type Repositories
- type Repository
- type RepositoryPolicies
- type Resource
- type Resources
- type Scm
- type Site
- type StringArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Activation ¶
type Build ¶
type Build struct { DefaultGoal string `xml:"defaultGoal,omitempty"` Directory string `xml:"directory,omitempty"` FinalName string `xml:"finalName,omitempty"` Filters *StringArray `xml:"filters,omitempty"` Resources *Resources `xml:"resources,omitempty"` TestResources *Resources `xml:"testResources,omitempty"` Plugins *Plugins `xml:"plugins,omitempty"` PluginManagement *PluginManagement `xml:"pluginManagement,omitempty"` 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 *Extensions `xml:"extensions,omitempty"` }
type CiManagement ¶
type Configuration ¶
type Configuration []interface{}
type Contributors ¶
type Contributors []Person
type Coordinates ¶
type Coordinates struct { GroupId string `xml:"groupId,omitempty"` ArtifactId string `xml:"artifactId,omitempty"` Version string `xml:"version,omitempty"` }
func NewCoordinates ¶
func NewCoordinates(g, a, v string) Coordinates
func (*Coordinates) AssignTo ¶
func (c *Coordinates) AssignTo(p *Project)
func (*Coordinates) CreateDependency ¶
func (c *Coordinates) CreateDependency() *Dependency
func (*Coordinates) Equal ¶
func (c *Coordinates) Equal(other *Coordinates) bool
func (*Coordinates) HasVersion ¶
func (c *Coordinates) HasVersion() bool
func (*Coordinates) RemoveVersion ¶
func (c *Coordinates) RemoveVersion()
func (*Coordinates) Similar ¶
func (c *Coordinates) Similar(other *Coordinates) bool
type Dependencies ¶
type Dependencies struct {
Values []Dependency `xml:"dependency,omitempty"`
}
func NewDependencies ¶
func NewDependencies() *Dependencies
func (*Dependencies) AddDependencies ¶
func (d *Dependencies) AddDependencies(deps []*Dependency)
func (*Dependencies) AddDependency ¶
func (d *Dependencies) AddDependency(dependency *Dependency)
func (*Dependencies) GetDependency ¶
func (d *Dependencies) GetDependency(c *Coordinates) *Dependency
func (*Dependencies) HasDependency ¶
func (d *Dependencies) HasDependency(c *Coordinates) bool
func (*Dependencies) RemoveDependency ¶
func (d *Dependencies) RemoveDependency(c *Coordinates) *Dependency
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"` Scope string `xml:"scope,omitempty"` Optional bool `xml:"optional,omitempty"` }
func (*Dependency) GetCoordinates ¶
func (d *Dependency) GetCoordinates() *Coordinates
func (Dependency) IsSimilar ¶
func (d Dependency) IsSimilar(other Dependency) bool
type DependencyManagement ¶
type DependencyManagement struct {
Dependencies *Dependencies `xml:"dependencies,omitempty"`
}
func NewDependencyManagement ¶
func NewDependencyManagement() *DependencyManagement
type Developers ¶
type Developers []Person
type DistributionManagement ¶
type DistributionManagement struct { Repository *DistributionRepository `xml:"repository,omitempty"` SnapshotRepository *DistributionRepository `xml:"snapshotRepository,omitempty"` Site *Site `xml:"site,omitempty"` Relocation *Relocation `xml:"relocation,omitempty"` DownloadUrl string `xml:"downloadUrl,omitempty"` Status string `xml:"status,omitempty"` }
type DistributionRepository ¶
type Execution ¶
type Execution struct { Id string `xml:"id,omitempty"` Goals *StringArray `xml:"goals,omitempty"` Phase string `xml:"phase,omitempty"` Inherited bool `xml:"inherited,omitempty"` Configuration *Configuration `xml:"configuration,omitempty"` }
type Executions ¶
type Executions []Execution
type Extensions ¶
type Extensions []Extension
type IssueManagement ¶
type MailingList ¶
type MailingLists ¶
type MailingLists []MailingList
type ModelReadWriter ¶
type ModelReadWriter interface { ModelReader ModelWriter }
type ModelReader ¶
type ModelReader interface { GetParent() *Parent HasParent() bool GetCoordinates() *Coordinates GetDependency(c *Coordinates) *Dependency HasDependency(c *Coordinates) bool GetManagedDependency(c *Coordinates) *Dependency HasManagedDependency(c *Coordinates) bool GetProperties() *map[string]string GetProperty() string HasProperty(k string) bool }
type ModelWriter ¶
type ModelWriter interface { SetParent(p *Parent) RemoveParent() *Parent SetCoordinates(c *Coordinates) AddDependency(d *Dependency) RemoveDependency(c *Coordinates) *Dependency AddManagedDependency(d *Dependency) AddManagedDependencies(d []*Dependency) RemoveManagedDependency(c *Coordinates) *Dependency AddProperty(k, v string) AddProperties(p map[string]string) }
type ModuleArray ¶
type ModuleArray struct {
Values []string `xml:"module,omitempty"`
}
type Notifier ¶
type Notifier struct { Type string `xml:"type,omitempty"` SendOnError string `xml:"sendOnError,omitempty"` SendOnFailure string `xml:"sendOnFailure,omitempty"` SendOnSuccess string `xml:"sendOnSuccess,omitempty"` SendOnWarning string `xml:"sendOnWarning,omitempty"` Configuration *Configuration `xml:"configuration,omitempty"` }
type Organization ¶
type Person ¶
type Person 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 *StringArray `xml:"roles,omitempty"` Timezone string `xml:"timezone,omitempty"` Properties *Properties `xml:"properties,omitempty"` }
type Plugin ¶
type Plugin struct { GroupId string `xml:"groupId,omitempty"` ArtifactId string `xml:"artifactId,omitempty"` Version string `xml:"version,omitempty"` Extensions bool `xml:"extensions,omitempty"` Inherited bool `xml:"inherited,omitempty"` Configuration *Properties `xml:"configuration,omitempty"` Dependencies *Dependencies `xml:"dependencies,omitempty"` Executions *Executions `xml:"executions,omitempty"` }
type PluginManagement ¶
type PluginManagement []Plugin
type Pom ¶
type Pom interface { Store() error Load() error GetPath() string GetDirectory() string ModelReadWriter }
type Prerequisites ¶
type Prerequisites struct {
Maven string `xml:"maven,omitempty"`
}
type Profile ¶
type Profile struct { Id string `xml:"id,omitempty"` Activation *Activation `xml:"activation,omitempty"` Build *Build `xml:"build,omitempty"` Modules *StringArray `xml:"modules,omitempty"` Repositories *Repositories `xml:"repositories,omitempty"` PluginRepositories *Repositories `xml:"pluginRepositories,omitempty"` Dependencies *Dependencies `xml:"dependencies,omitempty"` Reporting *Reporting `xml:"reporting,omitempty"` DependencyManagement *DependencyManagement `xml:"dependencyManagement,omitempty"` DistributionManagement *DistributionManagement `xml:"distributionManagement,omitempty"` }
type Project ¶
type Project struct { XMLName xml.Name `xml:"project"` 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"` Properties *Properties `xml:"properties,omitempty"` Dependencies *Dependencies `xml:"dependencies,omitempty"` DependencyManagement *DependencyManagement `xml:"dependencyManagement,omitempty"` Modules *ModuleArray `xml:"modules,omitempty"` Build *Build `xml:"build,omitempty"` Reporting *Reporting `xml:"reporting,omitempty"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` Url string `xml:"url,omitempty"` InceptionYear string `xml:"inceptionYear,omitempty"` Licenses *Licenses `xml:"licenses>license,omitempty"` Organization *Organization `xml:"organization,omitempty"` Developers *Developers `xml:"developers>developer,omitempty"` Contributors *Contributors `xml:"contributors>contributor,omitempty"` IssueManagement *IssueManagement `xml:"issueManagement,omitempty"` CiManagement *CiManagement `xml:"ciManagement,omitempty"` MailingLists *MailingLists `xml:"mailingLists>mailingList,omitempty"` Scm *Scm `xml:"scm,omitempty"` Prerequisites *Prerequisites `xml:"prerequisites,omitempty"` Repositories *Repositories `xml:"repositories>repository,omitempty"` PluginRepositories *Repositories `xml:"pluginRepositories>repository,omitempty"` DistributionManagement *DistributionManagement `xml:"distributionManagement,omitempty"` Profiles *Profiles `xml:"profiles>profile,omitempty"` }
func NewProject ¶
func NewProject() *Project
func (*Project) AddDependencies ¶
func (p *Project) AddDependencies(d []*Dependency)
func (*Project) AddDependency ¶
func (p *Project) AddDependency(d *Dependency)
func (*Project) AddManagedDependencies ¶
func (p *Project) AddManagedDependencies(d []*Dependency)
func (*Project) AddManagedDependency ¶
func (p *Project) AddManagedDependency(d *Dependency)
func (*Project) AddModules ¶
func (*Project) AddProperties ¶
func (*Project) AddProperty ¶
func (*Project) GetCoordinates ¶
func (p *Project) GetCoordinates() *Coordinates
func (*Project) GetDependency ¶
func (p *Project) GetDependency(c *Coordinates) *Dependency
func (*Project) GetManagedDependency ¶
func (p *Project) GetManagedDependency(c *Coordinates) *Dependency
func (*Project) HasDependency ¶
func (p *Project) HasDependency(c *Coordinates) bool
func (*Project) HasManagedDependency ¶
func (p *Project) HasManagedDependency(c *Coordinates) bool
func (*Project) HasProperty ¶
func (*Project) RemoveDependency ¶
func (p *Project) RemoveDependency(c *Coordinates) *Dependency
func (*Project) RemoveManagedDependency ¶
func (p *Project) RemoveManagedDependency(c *Coordinates) *Dependency
func (*Project) RemoveParent ¶
func (*Project) SetCoordinates ¶
func (p *Project) SetCoordinates(c *Coordinates)
type Properties ¶
func NewProperties ¶
func NewProperties() *Properties
func (*Properties) AddProperties ¶
func (p *Properties) AddProperties(props map[string]string)
func (*Properties) AddProperty ¶
func (p *Properties) AddProperty(k, v string)
func (*Properties) HasProperty ¶
func (p *Properties) HasProperty(k string) bool
func (*Properties) MarshalXML ¶
func (p *Properties) MarshalXML(d *xml.Encoder, start xml.StartElement) (err error)
func (*Properties) UnmarshalXML ¶
func (p *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
type Relocation ¶
type Repositories ¶
type Repositories []Repository
type Repository ¶
type Repository struct { Releases *RepositoryPolicies `xml:"releases,omitempty"` Snapshots *RepositoryPolicies `xml:"snapshots,omitempty"` Name string `xml:"name,omitempty"` Id string `xml:"id,omitempty"` Url string `xml:"url,omitempty"` Layout string `xml:"layout,omitempty"` }
type RepositoryPolicies ¶
type Resource ¶
type Resource struct { TargetPath string `xml:"targetPath,omitempty"` Filtering bool `xml:"filtering,omitempty"` Directory string `xml:"directory,omitempty"` Includes *StringArray `xml:"includes,omitempty"` Excludes *StringArray `xml:"excludes,omitempty"` }
type StringArray ¶
type StringArray struct {
Values []string
}
Click to show internal directories.
Click to hide internal directories.