Documentation
¶
Overview ¶
Package project assembles deterministic Java/Maven project outputs without publishing artifacts or mutating user build files.
Index ¶
- func CheckOwned(rootPath string, bundle Bundle, manifestPath string) error
- func DetectRoot(start string) (string, error)
- func MavenSnippet(options MavenOptions) string
- func MavenSnippetForProject(input GenerateInput, options MavenOptions) (string, error)
- func PlanNoCodegen(input release.MavenPlanningInput) release.MavenPlan
- func WriteOwned(rootPath string, bundle Bundle, manifestPath string) error
- func WriteOwnedChecked(rootPath string, bundle Bundle, manifestPath string, ...) error
- type Bundle
- type Contract
- type File
- type GenerateInput
- type Layout
- type MavenOptions
- type OwnedAddition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOwned ¶
CheckOwned verifies both output bytes and manifest ownership without changing any file. Missing, edited or stale outputs fail reproducibility checks.
func DetectRoot ¶
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 ¶
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 GenerateInput ¶
type MavenOptions ¶
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.