java

package
v0.0.0-...-9ce4fc3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package java provides a backend for Java using maven.

Index

Constants

This section is empty.

Variables

View Source
var JavaBackend = api.LanguageBackend{
	Name:             "java-maven",
	Specfile:         pomdotxml,
	Lockfile:         pomdotxml,
	IsAvailable:      isAvailable,
	FilenamePatterns: javaPatterns,
	Quirks:           api.QuirksAddRemoveAlsoLocks,
	GetPackageDir: func() string {
		return "target/dependency"
	},
	Search: search,
	Info:   info,
	Add:    addPackages,
	Remove: removePackages,
	Install: func(ctx context.Context) {

		span, ctx := tracer.StartSpanFromContext(ctx, "Maven install")
		defer span.Finish()
		util.RunCmd([]string{
			"mvn",
			"de.qaware.maven:go-offline-maven-plugin:resolve-dependencies",
			"dependency:copy-dependencies",
		})
	},
	ListSpecfile:                       listSpecfile,
	ListLockfile:                       listLockfile,
	Lock:                               func(ctx context.Context) {},
	InstallReplitNixSystemDependencies: nix.DefaultInstallReplitNixSystemDependencies,
}

JavaBackend is the UPM language backend for Java using Maven.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	XMLName     xml.Name `xml:"dependency"`
	GroupId     string   `xml:"groupId"`
	ArtifactId  string   `xml:"artifactId"`
	Version     string   `xml:"version"`
	PackageType string   `xml:"type"`
}

type DynamicDependency

type DynamicDependency struct {
	XMLName        xml.Name `xml:"DynamicDependency"`
	GroupId        string   `xml:"groupId"`
	ArtifactId     string   `xml:"artifactId"`
	Version        string   `xml:"version"`
	Classifier     string   `xml:"classifier"`
	RepositoryType string   `xml:"repositoryType"`
}

type Plugin

type Plugin struct {
	XMLName       xml.Name            `xml:"plugin"`
	GroupId       string              `xml:"groupId"`
	ArtifactId    string              `xml:"artifactId"`
	Version       string              `xml:"version"`
	Configuration PluginConfiguration `xml:"configuration"`
}

type PluginConfiguration

type PluginConfiguration struct {
	XMLName             xml.Name            `xml:"configuration"`
	DynamicDependencies []DynamicDependency `xml:"dynamicDependencies>DynamicDependency"`
}

type Project

type Project struct {
	XMLName      xml.Name     `xml:"project"`
	ModelVersion string       `xml:"modelVersion"`
	GroupId      string       `xml:"groupId"`
	ArtifactId   string       `xml:"artifactId"`
	Version      string       `xml:"version"`
	Dependencies []Dependency `xml:"dependencies>dependency"`
	Plugins      []Plugin     `xml:"build>plugins>plugin"`
}

type SearchDoc

type SearchDoc struct {
	Group          string `json:"g"`
	Artifact       string `json:"a"`
	Version        string `json:"latestVersion"`
	PackageType    string `json:"p"`
	CurrentVersion string `json:"v"`
}

func Info

func Info(name string) (SearchDoc, error)
func Search(keyword string) ([]SearchDoc, error)

type SearchResult

type SearchResult struct {
	Response struct {
		Docs []SearchDoc `json:"docs"`
	} `json:"response"`
}

Jump to

Keyboard shortcuts

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