Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct {
XMLName xml.Name `xml:"dependency"`
GroupId string `xml:"groupId"`
ArtifactId string `xml:"artifactId"`
Version string `xml:"version"`
Classifier string `xml:"classifier"`
Type string `xml:"type"`
Scope string `xml:"scope"`
Exclusions []Exclusion `xml:"exclusions>exclusion"`
}
Represent a dependency of the project
type DependencyManagement ¶
type DependencyManagement struct {
Dependencies []Dependency `xml:"dependencies>dependency"`
}
type Exclusion ¶
type Exclusion struct {
XMLName xml.Name `xml:"exclusion"`
GroupId string `xml:"groupId"`
ArtifactId string `xml:"artifactId"`
}
Represent an exclusion
type MavenProject ¶
type MavenProject struct {
XMLName xml.Name `xml:"project"`
ModelVersion string `xml:"modelVersion"`
Parent Parent `xml:"parent"`
GroupId string `xml:"groupId"`
ArtifactId string `xml:"artifactId"`
Version string `xml:"version"`
Packaging string `xml:"packaging"`
Name string `xml:"name"`
Repositories []Repository `xml:"repositories>repository"`
Properties Properties `xml:"properties"`
DependencyManagement DependencyManagement `xml:"dependencyManagement"`
Dependencies []Dependency `xml:"dependencies>dependency"`
Profiles []Profile `xml:"profiles"`
Build Build `xml:"build"`
PluginRepositories []PluginRepository `xml:"pluginRepositories>pluginRepository"`
}
Represent a POM file
func Parse ¶
func Parse(pomxmlPath string) (*MavenProject, error)
Parse a pom.xml file and return the MavenProject representing it.
func (*MavenProject) GetProperty ¶
func (mp *MavenProject) GetProperty(key string) (value string, exist bool)
GetProperty with a particular key. Case insensitive.
type Parent ¶
type Parent struct {
GroupId string `xml:"groupId"`
ArtifactId string `xml:"artifactId"`
Version string `xml:"version"`
}
Represent the parent of the project
type PluginRepository ¶
type PluginRepository struct {
Id string `xml:"id"`
Name string `xml:"name"`
Url string `xml:"url"`
}
Represent a pluginRepository
type Properties ¶ added in v1.3.2
func (*Properties) UnmarshalXML ¶ added in v1.3.2
func (props *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Repository ¶
Represent a repository
Click to show internal directories.
Click to hide internal directories.