maven

package
v0.0.0-...-035f8e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MvnTabSize = 3
	MvnMain    = "+- "
	MvnSub     = "|  "
	MvnLast    = "\\- "
	Suffix     = "deps.txt"
)

Variables

View Source
var MavenErrorProject []string = make([]string, 0)

MavenErrorProject maven build error project

Functions

func CalculateDependencyDepth

func CalculateDependencyDepth(text string) (int, string)

CalculateDependencyDepth 计算依赖深度

func ChangeDirectory

func ChangeDirectory(path string) error

ChangeDirectory changes the current working directory to the specified path

Types

type DependencyTxt

type DependencyTxt struct {
	Project string
	Txts    []MavenTxt
	Path    string
}

DependencyTxt maven dependency tree

func ParseMavenDependencyTxt

func ParseMavenDependencyTxt(fileName string) (*DependencyTxt, error)

ParseMavenDependencyTxt 解析mvn dependency:tree 命令生成的txt文件

type Maven

type Maven struct {
	Path     string // maven pom.xml path
	Project  string // project name
	FileName string // mvn dependency:tree 生成的txt文件名
	Ctx      context.Context
}

func NewMaven

func NewMaven(ctx context.Context, path, project string) *Maven

func (*Maven) ExectueCmd

func (m *Maven) ExectueCmd(retry bool) error

ExectueCmd 执行mvn dependency:tree 命令

func (*Maven) LoadingMvnTxtFile

func (m *Maven) LoadingMvnTxtFile() ([]string, error)

loadingMvnTxtFile 获取mvn dependency:tree 命令生成的txt文件

type MavenTxt

type MavenTxt struct {
	PTxt  string
	Txt   string
	Depth int
}

MavenTxt maven dependency 层级关系

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL