Documentation ¶
Index ¶
- Constants
- func ScanMavenProject(ctx context.Context, task *model.InspectorTask) ([]model.Module, error)
- type Coordinate
- func (c Coordinate) Compare(o Coordinate) int
- func (c Coordinate) Complete() bool
- func (c Coordinate) HasVersion() bool
- func (c Coordinate) IsBad() bool
- func (c Coordinate) IsSnapshotVersion() bool
- func (c Coordinate) Name() string
- func (c Coordinate) Normalize() Coordinate
- func (c Coordinate) String() string
- type Dependency
- type DepsMap
- type Inspector
- type M2Remote
- type Metadata
- type MvnCommandInfo
- type PluginGraphCmd
- type PluginGraphOutput
- type Pom
- type PomResolver
- type SnapshotVersion
- type UnresolvedPom
- type UserConfig
Constants ¶
View Source
const ( ErrMvnDisabled mvnError // maven: mvn command disabled ErrMvnNotFound // maven: mvn command not found ErrCheckMvnVersion // maven: eval mvn version failed ErrBadDepsGraph // maven: bad dependency graph ErrInvalidCoordinate // maven: invalid coordinate ErrArtifactNotFound // maven: artifact not found ErrGetArtifactFailed // maven: get artifact failed ErrParsePomFailed // maven: parse pom failed ErrOpenProject // maven: open project failed ErrPomCircularDependent // maven: pom file circular dependent ErrBadCoordinate // maven: bad coordinate ErrCouldNotResolve // maven: couldn't resolve ErrMvnExitErr // maven: mvn command exit with non-zero code ErrMvnCmd // maven: error during mvn execution ErrInspection // maven: can't inspect the maven project )
View Source
const (
ErrRemoteNoResource remoteError // m2remote: no resource
)
Variables ¶
This section is empty.
Functions ¶
func ScanMavenProject ¶
Types ¶
type Coordinate ¶
type Coordinate struct { GroupId string `json:"group_id"` ArtifactId string `json:"artifact_id"` Version string `json:"version"` }
func (Coordinate) Compare ¶ added in v1.8.0
func (c Coordinate) Compare(o Coordinate) int
func (Coordinate) Complete ¶
func (c Coordinate) Complete() bool
func (Coordinate) HasVersion ¶
func (c Coordinate) HasVersion() bool
func (Coordinate) IsBad ¶
func (c Coordinate) IsBad() bool
func (Coordinate) IsSnapshotVersion ¶ added in v1.9.8
func (c Coordinate) IsSnapshotVersion() bool
func (Coordinate) Name ¶
func (c Coordinate) Name() string
func (Coordinate) Normalize ¶
func (c Coordinate) Normalize() Coordinate
func (Coordinate) String ¶
func (c Coordinate) String() string
type Dependency ¶
type Dependency struct { Coordinate Children []Dependency `json:"children,omitempty"` }
func BuildDepTree ¶ added in v1.8.0
func BuildDepTree(ctx context.Context, resolver *PomResolver, coordinate Coordinate) *Dependency
func (Dependency) String ¶
func (d Dependency) String() string
type DepsMap ¶ added in v1.8.0
type DepsMap struct {
// contains filtered or unexported fields
}
func BackupResolve ¶ added in v1.8.0
func ScanDepsByPluginCommand ¶ added in v1.8.0
func (*DepsMap) ListAllEntries ¶ added in v1.8.0
func (d *DepsMap) ListAllEntries() []depsElement
type Inspector ¶
type Inspector struct{}
func (*Inspector) SupportFeature ¶ added in v1.9.2
func (i *Inspector) SupportFeature(feature model.InspectorFeature) bool
type Metadata ¶ added in v1.9.8
type Metadata struct { ModelVersion string `xml:"model_version,attr"` GroupId string `xml:"group_id"` ArtifactId string `xml:"artifact_id"` Version string `xml:"version"` SnapshotVersions []SnapshotVersion `xml:"versioning>snapshotVersions>snapshotVersion"` }
type MvnCommandInfo ¶ added in v1.8.0
type MvnCommandInfo struct { Path string `json:"path"` MvnVersion string `json:"mvn_version"` UserSettingsPath string `json:"user_settings_path"` JavaHome string `json:"java_home"` }
func CheckMvnCommand ¶ added in v1.8.0
func CheckMvnCommand(ctx context.Context) (info *MvnCommandInfo, err error)
func (MvnCommandInfo) String ¶ added in v1.8.0
func (m MvnCommandInfo) String() string
type PluginGraphCmd ¶ added in v1.8.0
type PluginGraphCmd struct { Profiles []string Timeout time.Duration ScanDir string MavenCmdInfo *MvnCommandInfo }
PluginGraphCmd helper to com.github.ferstl:depgraph-maven-plugin:4.0.1:graph
type PluginGraphOutput ¶ added in v1.8.0
type PluginGraphOutput struct { GraphName string `json:"graphName"` Artifacts []struct { GroupId string `json:"groupId"` ArtifactId string `json:"artifactId"` Optional bool `json:"optional"` Scopes []string `json:"scopes"` Version string `json:"version"` } `json:"artifacts"` Dependencies []struct { NumericFrom int `json:"numericFrom"` NumericTo int `json:"numericTo"` } `json:"dependencies"` }
PluginGraphOutput maven dependency-graph.json file
func (*PluginGraphOutput) ReadFromFile ¶ added in v1.8.0
func (d *PluginGraphOutput) ReadFromFile(path string) error
ReadFromFile dependency-graph.json
func (PluginGraphOutput) Tree ¶ added in v1.8.0
func (d PluginGraphOutput) Tree() (*Dependency, error)
type Pom ¶ added in v1.8.0
type Pom struct { Coordinate // contains filtered or unexported fields }
func (*Pom) ListDependencies ¶ added in v1.8.1
func (p *Pom) ListDependencies() (rs []gopom.Dependency)
ListDependencies 返回全部已解析属性的依赖
func (*Pom) ListDependencyManagements ¶ added in v1.8.1
func (p *Pom) ListDependencyManagements() (rs []gopom.Dependency)
ListDependencyManagements 返回全部已解析属性的依赖管理
func (Pom) ParentCoordinate ¶ added in v1.8.0
func (p Pom) ParentCoordinate() *Coordinate
type PomResolver ¶ added in v1.8.0
type PomResolver struct {
// contains filtered or unexported fields
}
func NewPomResolver ¶ added in v1.8.0
func NewPomResolver(ctx context.Context, remotes []M2Remote) *PomResolver
func (*PomResolver) ResolvePom ¶ added in v1.8.0
func (r *PomResolver) ResolvePom(ctx context.Context, coordinate Coordinate) (*Pom, error)
type SnapshotVersion ¶ added in v1.9.8
type UnresolvedPom ¶ added in v1.8.0
func ReadLocalProject ¶ added in v1.8.0
func ReadLocalProject(ctx context.Context, dir string) ([]*UnresolvedPom, error)
func (UnresolvedPom) Coordinate ¶ added in v1.8.0
func (u UnresolvedPom) Coordinate() Coordinate
func (UnresolvedPom) ParentCoordinate ¶ added in v1.8.0
func (u UnresolvedPom) ParentCoordinate() *Coordinate
type UserConfig ¶ added in v1.8.0
func GetMvnConfig ¶ added in v1.8.0
func GetMvnConfig(ctx context.Context) (*UserConfig, error)
func (UserConfig) String ¶ added in v1.8.0
func (u UserConfig) String() string
Source Files ¶
- backup_scan.go
- base.go
- coordinate.go
- dep_tree_builder.go
- deps.go
- err.go
- err_string.go
- fetcher.go
- find_modules.go
- http_remote.go
- local_remote.go
- m2setting.go
- maven.go
- metadata.go
- mvn_cmd_utils.go
- mvn_graph_cmd.go
- plugin_graph_output.go
- plugin_scan.go
- pom.go
- pom_dependency_set.go
- pom_property.go
- pom_resolver.go
- remote_error.go
- remote_error_string.go
- resolve_context.go
Click to show internal directories.
Click to hide internal directories.