java

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package java implements omnibump support for Java projects. Supports multiple build tools (Maven, Gradle, etc.)

Package java implements omnibump support for Java projects. Supports multiple build tools (Maven, Gradle, etc.) through a unified interface.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBuildToolFound = errors.New("no supported Java build tool found")

ErrNoBuildToolFound is returned when no supported build tool is detected.

Functions

This section is empty.

Types

type BuildTool

type BuildTool interface {
	// Name returns the build tool identifier (e.g., "maven", "gradle")
	Name() string

	// Detect checks if this build tool is present in the given directory.
	// Returns true if manifest files for this build tool are found.
	Detect(ctx context.Context, dir string) (bool, error)

	// Update performs the dependency update using the provided configuration.
	Update(ctx context.Context, cfg *languages.UpdateConfig) error

	// Validate checks if the updates were applied successfully.
	Validate(ctx context.Context, cfg *languages.UpdateConfig) error

	// GetManifestFiles returns the list of manifest files for this build tool
	// (e.g., ["pom.xml"] for Maven, ["build.gradle"] for Gradle)
	GetManifestFiles() []string

	// GetAnalyzer returns an analyzer for this build tool, or nil if not supported.
	GetAnalyzer() analyzer.Analyzer
}

BuildTool defines the interface that each Java build tool must implement. This allows omnibump to support Maven, Gradle, and other Java build systems with a unified interface.

type Java

type Java struct {
	// contains filtered or unexported fields
}

Java implements the Language interface for Java projects. It auto-detects the build tool (Maven, Gradle, etc.) and delegates to it.

func (*Java) Detect

func (j *Java) Detect(ctx context.Context, dir string) (bool, error)

Detect checks if any Java build tool is present in the directory.

func (*Java) GetBuildTool

func (j *Java) GetBuildTool(ctx context.Context, dir string) (BuildTool, error)

GetBuildTool returns the detected build tool. This is useful for the analyzer to get build tool-specific analyzers.

func (*Java) GetManifestFiles

func (j *Java) GetManifestFiles() []string

GetManifestFiles returns Java manifest files from the detected build tool.

func (*Java) Name

func (j *Java) Name() string

Name returns the language identifier.

func (*Java) SupportsAnalysis

func (j *Java) SupportsAnalysis() bool

SupportsAnalysis returns true since Java has analysis capabilities.

func (*Java) Update

func (j *Java) Update(ctx context.Context, cfg *languages.UpdateConfig) error

Update performs dependency updates on a Java project.

func (*Java) Validate

func (j *Java) Validate(ctx context.Context, cfg *languages.UpdateConfig) error

Validate checks if the updates were applied successfully.

Directories

Path Synopsis
Package gradle implements Gradle build tool support for Java projects.
Package gradle implements Gradle build tool support for Java projects.
Package maven implements Maven build tool support for Java projects.
Package maven implements Maven build tool support for Java projects.

Jump to

Keyboard shortcuts

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