project

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 18 Imported by: ? 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

Overview

Package project assembles deterministic Java/Maven project outputs without publishing artifacts or mutating user build files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOwned

func CheckOwned(rootPath string, bundle Bundle, manifestPath string) error

CheckOwned verifies both output bytes and manifest ownership without changing any file. Missing, edited or stale outputs fail reproducibility checks.

func DetectRoot

func DetectRoot(start string) (string, error)

DetectRoot walks upward to the nearest pom.xml. It performs no writes.

func MavenSnippet

func MavenSnippet(options MavenOptions) string

MavenSnippet returns an opt-in POM fragment. It neither edits pom.xml nor deploys/signs an artifact. The caller must provide the actual CLI invocation.

func MavenSnippetForProject

func MavenSnippetForProject(input GenerateInput, options MavenOptions) (string, error)

MavenSnippetForProject infers the optional ECMA runtime from the actual checked native schema positions, not keyword lookalikes in example payloads.

func PlanNoCodegen

func PlanNoCodegen(input release.MavenPlanningInput) release.MavenPlan

func WriteOwned

func WriteOwned(rootPath string, bundle Bundle, manifestPath string) error

WriteOwned replaces only files proven unchanged since the preceding generated manifest. All new bytes are staged before any output changes. Returned install failures restore backups; process-crash atomicity is not promised.

func WriteOwnedChecked

func WriteOwnedChecked(rootPath string, bundle Bundle, manifestPath string, preconditions []release.FilePrecondition) error

WriteOwnedChecked rechecks content-bound planning inputs after acquiring the shared project/release lock and before staging or deleting owned outputs.

Types

type Bundle

type Bundle struct{ Files []File }

func Generate

func Generate(input GenerateInput) (Bundle, error)

Generate creates all outputs in memory. Any contract failure returns no partial bundle. Call WriteOwned only after this succeeds.

type Contract

type Contract struct {
	Family           string
	Version          *release.Version // nil means SNAPSHOT
	Program          *language.Program
	NativeProject    *native.Project
	RootType         string
	LogicalNamespace string
	JavaPackage      string
	NoCodegen        bool
	Formats          []native.Format
	Wire             native.WireMetadata
	PropertyTests    java.PropertyTestOptions
}

type File

type File struct {
	Path    string
	Content []byte
}

type GenerateInput

type GenerateInput struct {
	Contracts       []Contract
	BaseJavaPackage string
	ContractClass   string
	Layout          Layout
}

type Layout

type Layout struct {
	SourceDir   string
	ResourceDir string
	TestDir     string
	Flat        bool
}

type MavenOptions

type MavenOptions struct {
	CLIExecutable string
	CLIArguments  []string
	SourceDir     string
	ResourceDir   string
	TestDir       string
	NativeRegex   bool
}

type OwnedAddition

type OwnedAddition struct {
	Artifacts           []release.Artifact
	Replacements        []release.ReplacementArtifact
	Deletions           []release.DeletionArtifact
	ManifestCreate      *release.Artifact
	ManifestReplacement *release.ReplacementArtifact
}

func PlanOwnedAddition

func PlanOwnedAddition(rootPath string, bundle Bundle, manifestPath string) (OwnedAddition, error)

PlanOwnedAddition validates a complete generated bundle and prepares its immutable additions, content-bound replacements/deletions, and exact ownership-manifest transition for release.Promote. It does not write.

Jump to

Keyboard shortcuts

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