Skip to content

Decouple Maven plugin unit tests from remote bootstrap tasks - #1007

Open
jormundur00 wants to merge 1 commit into
masterfrom
rhei/issue-985
Open

Decouple Maven plugin unit tests from remote bootstrap tasks#1007
jormundur00 wants to merge 1 commit into
masterfrom
rhei/issue-985

Conversation

@jormundur00

Copy link
Copy Markdown
Member

What changed

./gradlew -p native-maven-plugin test now runs Maven plugin unit tests without building the plugin JAR, generating its Maven descriptor, preparing a Maven local repository, or launching embedded Maven. Unit tests use compiled class and resource directories directly.

Descriptor generation, publication, inspections, and functional tests still use the packaged plugin descriptor and controlled Maven repositories. Offline functional work now validates a keyed, complete seed without modifying it and reports the recovery command when the seed is missing or stale.

Why

Transient Maven repository failures should not prevent ordinary unit tests from running after Gradle dependencies are available. Network-dependent repository seeding remains part of the integration boundary, while offline failures are deterministic and actionable when that prerequisite is genuinely required.

Fixes #985

Example

./gradlew -p native-maven-plugin test

The unit-test task graph no longer schedules jar, generatePluginDescriptor, prepareMavenLocalRepo, or validateMavenLocalRepo. For offline integration work with an invalid seed, validation fails before Maven starts with:

The seeded Maven repository is missing or stale; run prepareMavenLocalRepo online.

Implementation summary

  • Replaced the Maven module's unit-test self-artifact dependencies with main and test-fixture class/resource outputs for standalone and included-build layouts.
  • Made Maven offline mode and snapshot updates explicit task inputs instead of applying unconditional updates to every Maven invocation.
  • Added schema-versioned, input-keyed seed manifests with complete file inventories and SHA-256 validation.
  • Added staged, failure-safe online seed replacement and read-only offline preflight; normal prepareMavenLocalRepo now rebuilds a seed rejected by validation.
  • Preserved packaged descriptor generation and real Maven functional coverage, including offline descriptor loading.

Validation

The following checks passed:

  • grund check
  • grund fmt . --marker --cross-refs --check
  • git diff --check
  • ./gradlew -p native-maven-plugin/build-plugins test
  • ./gradlew -p native-maven-plugin --offline test --rerun-tasks
  • ./gradlew :native-maven-plugin:inspections
  • ./gradlew -p native-maven-plugin prepareMavenLocalRepo
  • ./gradlew -p native-maven-plugin --offline validateMavenLocalRepo
  • ./gradlew -p native-maven-plugin --offline validateMavenLocalRepo assemble
  • ./gradlew -p native-maven-plugin publishAllPublicationsToCommonRepository
  • standalone and workspace test --dry-run task-graph assertions excluding the module JAR, descriptor, seed, and validation tasks
  • targeted Maven descriptor inspection confirming META-INF/maven/plugin.xml and plugin-help.xml
  • offline seed rejection and normal online recovery after adding an unexpected seed file
  • online and offline JavaApplicationFunctionalTest help:describe descriptor-loading scenario

The full Maven functional matrix, full repository build, exact CI matrix, documentation render, and GraalVM/native-image jobs were not run in this environment. The external-Maven descriptor-loading scenario was not rerun during review cycle 2, and validation did not use a fresh isolated Gradle user home; the affected unit lifecycle was instead run offline with --rerun-tasks.

AI workflow

Generated by Rhei’s github-issue-fix workflow using 16 completed AI-assisted steps, 3 resolved models, and 2 focused review cycles.

View AI workflow details

Approved proposal: 16eeea21f028a2e1.

  1. Issue intake and repository grounding

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 869285 total · 855888 input (785536 cached) · 13397 output

Captured the issue, repository rules, specifications, and implementation scope.

  1. Implement approved fix

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 14701992 total · 14655788 input (14356736 cached) · 46204 output

Implemented the class-directory unit-test boundary and failure-safe Maven seed lifecycle.

  1. Validate implementation — visit 1

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 2765066 total · 2750625 input (2645376 cached) · 14441 output

Ran the initial grounding, build, task-graph, seed, descriptor, and functional validation.

  1. Requirements review — cycle 1

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 258674 total · 256091 input (213504 cached) · 2583 output

Checked the implementation against issue acceptance criteria and preserved CI coverage.

  1. Spec review — cycle 1

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 255517 total · 252001 input (211456 cached) · 3516 output

Checked the amended architecture and end-to-end specifications and their citations.

  1. Implementation review — cycle 1

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 238414 total · 234116 input (191488 cached) · 4298 output

Inspected the implementation for behavior, safety, and regression coverage.

  1. Validation review — cycle 1

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 164509 total · 161112 input (129280 cached) · 3397 output

Reviewed validation evidence and identified the seed up-to-date recovery blocker.

  1. Aggregate review — cycle 1

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 238584 total · 236278 input (206208 cached) · 2306 output

Aggregated the first review cycle and routed the repair.

  1. Address review findings — repair cycle 1

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 578339 total · 573207 input (523264 cached) · 5132 output

Added seed validity to the task up-to-date predicate and a TestKit recovery regression.

  1. Validate repaired implementation — visit 2

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 2772229 total · 2758101 input (2651776 cached) · 14128 output

Verified invalid-seed rejection, normal online recovery, offline reuse, and assembly.

  1. Requirements review — cycle 2

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 261272 total · 258782 input (218112 cached) · 2490 output

Rechecked issue fit after the repair with no requirements blockers.

  1. Spec review — cycle 2

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 229933 total · 227607 input (183936 cached) · 2326 output

Rechecked strict grounding and the amended specification points with no blockers.

  1. Implementation review — cycle 2

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 565495 total · 558965 input (506240 cached) · 6530 output

Re-reviewed the repaired code and regression coverage with no implementation blockers.

  1. Validation review — cycle 2

Model: openai:gpt-5.6-terra · Agent: codex · Reasoning effort: medium
Tokens: 229414 total · 224250 input (188928 cached) · 5164 output

Re-reviewed focused validation and recorded the remaining environment-dependent checks.

  1. Aggregate review — cycle 2

Model: openai:gpt-5.6-sol · Agent: codex · Reasoning effort: medium
Tokens: 199023 total · 197091 input (172416 cached) · 1932 output

Confirmed no blockers and approved publication with the validation limitations disclosed above.

  1. Publish ready PR

Model: openai:gpt-5.6-luna · Agent: codex · Reasoning effort: medium
Tokens: not finalized at PR creation

Committed the reviewed fix, pushed graalvm:rhei/issue-985 to origin, opened the ready-for-review PR, and applied existing configured labels.

Aggregate token usage: 24327746 total · 24199902 input (23184256 cached) · 127844 output

The aggregate excludes the current unfinalized publication step. Deterministic program routing is non-model work. Focused review cycles: 2. Review-repair cycles: 1. Accounting coverage: 15 finalized of 16 listed steps. Superseded attempts: none. Unmeasured attempts: none. Unsupported cache dimensions: input cache write, output cached read, and output cache write.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement. rhei

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple Maven plugin unit tests from remote bootstrap tasks

1 participant