artifactpath

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split

func Split(p string) (Path, Path, bool)

Split parses the wildcard part of an Ivy or sbt URL, which is one of two layouts:

  • Maven layout, `com/example/lib/1.0/lib-1.0.jar` (what sbt publishes by default and what `m2compatible` Ivy resolvers use): the last segment is the file, the two before it the version and the module, everything earlier the group, joined with dots. Recognised when the file name starts with `<module>-<version>` (a SNAPSHOT version dir also holds timestamped files `<module>-<base version>-<timestamp>-<n>.jar`).
  • Ivy layout, `<org>/<module>/<revision>/<file>`, where the file name may include subdirectories (`jars/lib-1.0.jar`) and the org is one segment.

The two agree for every four-segment path. It returns the current reading, the legacy reading and whether the path is valid. The legacy reading is how releases before multi-segment groups understood the path: always the first three segments and the rest. Rows published that way live under those coordinates, so read and delete fall back to them; it equals the current reading when there is nothing to fall back to. The path is invalid when it has fewer than four segments or one that is not a plain segment (see pathseg.Name).

Types

type Path

type Path struct {
	// Group is the organisation / group id, dotted ("com.example") whichever way
	// the client wrote it.
	Group    string
	Module   string
	Version  string
	Filename string // may hold a subdirectory in the Ivy layout ("jars/lib.jar")
}

Path is the address of one file in an Ivy or sbt repository.

Jump to

Keyboard shortcuts

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