Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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"`
DependencyManagement []Dependency `xml:"dependencyManagement>dependencies>dependency"`
}
A Manifest represents a POM manifest file.
func ResolveManifestFromTarget ¶ added in v0.7.33
ResolveManifestFromTarget tries to determine what target is supposed to be and then reads the POM manifest file pointed to by target 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 either the module or to a parent module
// under which this one is listed. This is where `mvn` should be run to get the dependency tree.
Dir string
}
A MvnModule can identify a Maven project with the target path.
Click to show internal directories.
Click to hide internal directories.