maven

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeVersionToPropertyTags

func ChangeVersionToPropertyTags() func(repository Repository, project config.Project) error

func ChangeVersionToPropertyTagsOnModel

func ChangeVersionToPropertyTagsOnModel(model *pom.Model) error

func CleanManualVersions

func CleanManualVersions() func(repository Repository, project config.Project) error

func GetBannedModel

func GetBannedModel(url string) (*pom.Model, error)

func Graph

func Graph(onlySecondParty bool, excludeTestScope bool, includeFilters, excludeFilters []string) func(repository Repository, project config.Project) error

func GraphArgs

func GraphArgs() []string

func IsMajorUpgrade

func IsMajorUpgrade(old JavaVersion, new JavaVersion) bool

func ListUnusedAndUndeclared

func ListUnusedAndUndeclared(pomFile string) error

func MergeAndWritePomFiles

func MergeAndWritePomFiles(source config.Project, target config.Project) error

func MergePoms

func MergePoms(from *pom.Model, to *pom.Model) error

func RemoveDeprecated

func RemoveDeprecated(cloudConfig config.CloudConfig, model *pom.Model) (templates []config.CloudTemplate, err error)

func RunOn

func RunOn(cmd string, args ...string) func(repository Repository, project config.Project) error

func SetLogger

func SetLogger(logger logrus.FieldLogger)

func StatusDeprecated

func StatusDeprecated() func(repository Repository, project config.Project) error

func UpdateProperty

func UpdateProperty(property, version string) []string

func Upgrade2PartyDependencies

func Upgrade2PartyDependencies() func(repository Repository, project config.Project) error

func Upgrade3PartyDependencies

func Upgrade3PartyDependencies() func(repository Repository, project config.Project) error

func UpgradeDependenciesWithVersions

func UpgradeDependenciesWithVersions() func(repository Repository, project config.Project) error

func UpgradeDependency

func UpgradeDependency(groupId string, artifactId string) func(repository Repository, project config.Project) error

func UpgradeKotlin

func UpgradeKotlin() func(repository Repository, project config.Project) error

func UpgradeKotlinWithVersions

func UpgradeKotlinWithVersions() func(repository Repository, project config.Project) error

func UpgradeParent

func UpgradeParent() func(repository Repository, project config.Project) error

func UpgradePlugins

func UpgradePlugins() func(repository Repository, project config.Project) error

func UseLatestVersion

func UseLatestVersion(groupId, artifactId string) []string

func WriteGraphStyles

func WriteGraphStyles(styles GraphStyles, projectPath string) error

Types

type DependencyAnalyzeResult

type DependencyAnalyzeResult struct {
	UsedUndeclared []pom.Dependency
	UnusedDeclared []pom.Dependency
}

func DependencyAnalyze

func DependencyAnalyze(rawOutput string) DependencyAnalyzeResult

type GraphStyle

type GraphStyle struct {
	Type      string `json:"type"`
	Color     string `json:"color"`
	FillColor string `json:"fill-color"`
	Style     string `json:"style"`
}

type GraphStyles

type GraphStyles struct {
	NodeStyles map[string]GraphStyle `json:"node-styles"`
}

func GraphDefaultStyles

func GraphDefaultStyles() GraphStyles

type JavaVersion

type JavaVersion struct {
	Major           int
	Minor           int
	Patch           int
	Suffix          string
	SuffixSeparator string
	// contains filtered or unexported fields
}

func ParseVersion

func ParseVersion(version string) (JavaVersion, error)

func (JavaVersion) IsDifferentFrom

func (a JavaVersion) IsDifferentFrom(b JavaVersion) bool

func (JavaVersion) IsLessThan

func (a JavaVersion) IsLessThan(b JavaVersion) bool

func (JavaVersion) IsReleaseVersion

func (a JavaVersion) IsReleaseVersion() bool

func (JavaVersion) ToString

func (a JavaVersion) ToString() string

type M2Settings

type M2Settings struct {
	XMLName           xml.Name `xml:"settings"`
	Text              string   `xml:",chardata"`
	LocalRepository   string   `xml:"localRepository"`
	InteractiveMode   string   `xml:"interactiveMode"`
	UsePluginRegistry string   `xml:"usePluginRegistry"`
	Offline           string   `xml:"offline"`
	Proxies           []struct {
		Text  string `xml:",chardata"`
		Proxy struct {
			Text          string `xml:",chardata"`
			Active        string `xml:"active"`
			Protocol      string `xml:"protocol"`
			Username      string `xml:"username"`
			Password      string `xml:"password"`
			Port          string `xml:"port"`
			Host          string `xml:"host"`
			NonProxyHosts string `xml:"nonProxyHosts"`
			ID            string `xml:"id"`
		} `xml:"proxy"`
	} `xml:"proxies"`
	Servers  Servers `xml:"servers"`
	Mirrors  Mirrors `xml:"mirrors"`
	Profiles struct {
		Text    string `xml:",chardata"`
		Profile []struct {
			Text       string `xml:",chardata"`
			Activation struct {
				Text            string `xml:",chardata"`
				ActiveByDefault string `xml:"activeByDefault"`
				Jdk             string `xml:"jdk"`
				Os              struct {
					Text    string `xml:",chardata"`
					Name    string `xml:"name"`
					Family  string `xml:"family"`
					Arch    string `xml:"arch"`
					Version string `xml:"version"`
				} `xml:"os"`
				Property struct {
					Text  string `xml:",chardata"`
					Name  string `xml:"name"`
					Value string `xml:"value"`
				} `xml:"property"`
				File struct {
					Text    string `xml:",chardata"`
					Missing string `xml:"missing"`
					Exists  string `xml:"exists"`
				} `xml:"file"`
			} `xml:"activation"`
			Properties   string `xml:"properties"`
			Repositories struct {
				Text       string `xml:",chardata"`
				Repository []struct {
					Text     string `xml:",chardata"`
					Releases struct {
						Text           string `xml:",chardata"`
						Enabled        bool   `xml:"enabled"`
						UpdatePolicy   string `xml:"updatePolicy"`
						ChecksumPolicy string `xml:"checksumPolicy"`
					} `xml:"releases"`
					Snapshots struct {
						Text           string `xml:",chardata"`
						Enabled        string `xml:"enabled"`
						UpdatePolicy   string `xml:"updatePolicy"`
						ChecksumPolicy string `xml:"checksumPolicy"`
					} `xml:"snapshots"`
					ID     string `xml:"id"`
					Name   string `xml:"name"`
					URL    string `xml:"url"`
					Layout string `xml:"layout"`
				} `xml:"repository"`
			} `xml:"repositories"`
			PluginRepositories []struct {
				Text             string `xml:",chardata"`
				PluginRepository struct {
					Text     string `xml:",chardata"`
					Releases struct {
						Text           string `xml:",chardata"`
						Enabled        string `xml:"enabled"`
						UpdatePolicy   string `xml:"updatePolicy"`
						ChecksumPolicy string `xml:"checksumPolicy"`
					} `xml:"releases"`
					Snapshots struct {
						Text           string `xml:",chardata"`
						Enabled        string `xml:"enabled"`
						UpdatePolicy   string `xml:"updatePolicy"`
						ChecksumPolicy string `xml:"checksumPolicy"`
					} `xml:"snapshots"`
					ID     string `xml:"id"`
					Name   string `xml:"name"`
					URL    string `xml:"url"`
					Layout string `xml:"layout"`
				} `xml:"pluginRepository"`
			} `xml:"pluginRepositories"`
			ID string `xml:"id"`
		} `xml:"profile"`
	} `xml:"profiles"`
	ActiveProfiles []struct {
		Text          string `xml:",chardata"`
		ActiveProfile string `xml:"activeProfile"`
	} `xml:"activeProfiles"`
	PluginGroups []struct {
		Text        string `xml:",chardata"`
		PluginGroup string `xml:"pluginGroup"`
	} `xml:"pluginGroups"`
}

func (M2Settings) FindServerWith

func (settings M2Settings) FindServerWith(id string) (bool, Server)

type Mirror

type Mirror struct {
	Text     string `xml:",chardata"`
	MirrorOf string `xml:"mirrorOf"`
	Name     string `xml:"name"`
	URL      string `xml:"url"`
	ID       string `xml:"id"`
}

type Mirrors

type Mirrors struct {
	Text   string   `xml:",chardata"`
	Mirror []Mirror `xml:"mirror"`
}

type Repositories

type Repositories struct {
	Fallback Repository
	Profile  []Repository
	Mirror   []Repository
}

func (Repositories) GetDefaultRepository

func (repos Repositories) GetDefaultRepository() (Repository, error)

type Repository

type Repository struct {
	Id   string
	Url  string
	Auth *RepositoryAuth
}

func DefaultRepository

func DefaultRepository() (Repository, error)

func RepositoryFrom

func RepositoryFrom(url string, username string, password string) Repository

func (Repository) GetMetaData

func (repository Repository) GetMetaData(groupID string, artifactId string) (metaData RepositoryMetadata, err error)

type RepositoryAuth

type RepositoryAuth struct {
	Username  string
	Password  string
	Encrypted bool
}

type RepositoryMetadata

type RepositoryMetadata struct {
	XMLName      xml.Name `xml:"metadata"`
	Text         string   `xml:",chardata"`
	ModelVersion string   `xml:"modelVersion,attr"`
	GroupId      string   `xml:"groupId"`
	ArtifactId   string   `xml:"artifactId"`
	Versioning   struct {
		Text     string `xml:",chardata"`
		Latest   string `xml:"latest"`
		Release  string `xml:"release"`
		Versions struct {
			Text    string   `xml:",chardata"`
			Version []string `xml:"version"`
		} `xml:"versions"`
		LastUpdated string `xml:"lastUpdated"`
	} `xml:"versioning"`
}

func (RepositoryMetadata) LatestRelease

func (meta RepositoryMetadata) LatestRelease() (JavaVersion, error)

type Server

type Server struct {
	Text                 string `xml:",chardata"`
	Username             string `xml:"username"`
	Password             string `xml:"password"`
	PrivateKey           string `xml:"privateKey"`
	Passphrase           string `xml:"passphrase"`
	FilePermissions      string `xml:"filePermissions"`
	DirectoryPermissions string `xml:"directoryPermissions"`
	Configuration        string `xml:"configuration"`
	ID                   string `xml:"id"`
}

type Servers

type Servers struct {
	Text   string   `xml:",chardata"`
	Server []Server `xml:"server"`
}

type Settings

type Settings struct {
	Path     string
	Settings M2Settings
}

func NewSettings

func NewSettings() (settings Settings, err error)

func (Settings) GetRepositories

func (settings Settings) GetRepositories() (Repositories, error)

func (Settings) ListRepositories

func (settings Settings) ListRepositories() error

type VersionSort

type VersionSort []JavaVersion

func (VersionSort) Len

func (a VersionSort) Len() int

func (VersionSort) Less

func (a VersionSort) Less(i, j int) bool

func (VersionSort) Swap

func (a VersionSort) Swap(i, j int)

Jump to

Keyboard shortcuts

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