Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GraphFromTarget ¶ added in v0.7.27
GraphFromTarget returns simply the list of dependencies listed within the manifest file.
Types ¶
type Dependency ¶
type Dependency struct { GroupId string `xml:"groupId"` ArtifactId string `xml:"artifactId"` Version string `xml:"version"` // Scope is where the dependency is used, such as "test" or "runtime". Scope string `xml:"scope"` Failed bool }
func ReadDependencyTree ¶
func ReadDependencyTree(lines []string, parser LineParser) ([]Dependency, map[Dependency][]Dependency, error)
func (Dependency) ID ¶ added in v0.7.27
func (d Dependency) ID() string
ID returns the dependency identifier as groupId:artifactId.
type LineParser ¶
type LineParser func(line string) (level int, node Dependency, err error)
level is 1-indexed
type Manifest ¶
type Manifest struct { Project xml.Name `xml:"project"` Parent Parent `xml:"parent"` Modules []string `xml:"modules>module"` ArtifactID string `xml:"artifactId"` GroupID string `xml:"groupId"` Version string `xml:"version"` Description string `xml:"description"` Name string `xml:"name"` URL string `xml:"url"` Dependencies []Dependency `xml:"dependencies>dependency"` }
A Manifest represents a POM manifest file.
func ResolveManifestFromBuildTarget ¶ added in v0.7.27
ResolveManifestFromBuildTarget tries to determine what buildTarget is supposed to be and then reads the POM manifest file pointed to by buildTarget if it is a path to such a file or module.
type Maven ¶
type Maven struct {
Cmd string
}
func (*Maven) DependencyList ¶
DependencyList runs Maven's dependency:list goal for the specified project.
type MvnModule ¶ added in v0.7.27
type MvnModule struct { // Name is taken from the module's POM file. Name string // Target is the relative path from the root of the FOSSA project to the module's manifest file or to // the directory containing the module's "pom.xml". The target may name a file other than "pom.xml" and // it may even be the groupId:artifactId string identifying the "Maven project". Target string // Dir is the relative path from the root of the FOSSA project to the module. Dir string }
A MvnModule can identify a Maven project with the target path.
func Modules ¶
Modules returns a list specifying the Maven module at path, which may name a file or directory, and all the Maven modules nested below it. The Target field of each MvnModule is set to the directory or manifest file describing the module. The visited manifest files are listed in the checked map.