archive

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 25 Imported by: 2

Documentation

Overview

Package archive extracts Java archive files.

Index

Constants

View Source
const (
	// Name is the unique name of this extractor.
	Name = "java/archive"
)

Variables

This section is empty.

Functions

func IsArchive added in v0.1.7

func IsArchive(path string) bool

IsArchive returns true if the file path ends with one of the supported archive extensions.

func New

New returns a Java archive extractor.

func NewOmitEmptyLinesReader added in v0.1.4

func NewOmitEmptyLinesReader(r io.Reader) io.Reader

NewOmitEmptyLinesReader returns a new reader that omits empty lines from the input reader.

Types

type Extractor

type Extractor struct {
	Stats stats.Collector
	// contains filtered or unexported fields
}

Extractor extracts Java packages from archive files.

func (Extractor) Extract

Extract extracts java packages from archive files passed through input.

func (Extractor) FileRequired

func (e Extractor) FileRequired(api filesystem.FileAPI) bool

FileRequired returns true if the specified file matches java archive file patterns.

func (Extractor) Name

func (e Extractor) Name() string

Name of the extractor.

func (Extractor) Requirements added in v0.1.3

func (e Extractor) Requirements() *plugin.Capabilities

Requirements of the extractor.

func (Extractor) Version

func (e Extractor) Version() int

Version of the extractor.

type JarProps

type JarProps struct {
	ArtifactID string
	Version    string
	GroupID    string
}

JarProps stores the name, version, and group ID of a Java archive.

func ParseFilename

func ParseFilename(filePath string) *JarProps

ParseFilename attempts to figure out the package name, version, and group ID of a Java archive based on its filename. Returns nil if parsing was unsuccessful.

type PomProps

type PomProps struct {
	GroupID    string
	ArtifactID string
	Version    string
}

PomProps for identifying Maven package.

Directories

Path Synopsis
Package metadata defines a Metadata struct for Java archives.
Package metadata defines a Metadata struct for Java archives.

Jump to

Keyboard shortcuts

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