Skip to content

refactor(build): standard Maven layout — engine in core/, aggregator at the root#366

Merged
DemchaAV merged 11 commits into
2.0-devfrom
refactor/repository-layout
Jul 12, 2026
Merged

refactor(build): standard Maven layout — engine in core/, aggregator at the root#366
DemchaAV merged 11 commits into
2.0-devfrom
refactor/repository-layout

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The repository root doubled as the graph-compose-core module while the full reactor was hidden
in aggregator/pom.xml, so ./mvnw clean verify at the root silently built only the engine and
the "which pom is the project" story took a paragraph to explain. Standardising the layout before
the release tooling ossifies the paths makes ./mvnw clean verify build the whole reactor and
removes a class of "green but only built core" mistakes.

What

A purely physical move — no Maven coordinates, artifact names, Java packages, public API,
ServiceLoader registrations, or versions change:

  • src/core/src/, graph-compose-core pom.xmlcore/pom.xml, and the
    graph-compose-build aggregator aggregator/pom.xml → the repository-root pom.xml. The
    aggregator/ directory is removed. (481 pure git mv renames — blame --follow intact.)
  • The root aggregator <modules> drop their ../ prefixes (..core); the four modules that
    inherit it (examples, benchmarks, qa, coverage) point their parent relativePath at ../pom.xml.
  • The documentation / architecture guards no longer assume the engine basedir is the repo root: a
    new RepoRoot resolver walks up to the Maven wrapper, engine-local reads are prefixed core/,
    and VersionConsistencyGuardTest reads the engine version from core/pom.xml with the root
    pom.xml as the reactor aggregator. The qa RepoPaths locator switches its sentinel from the
    removed aggregator/pom.xml to mvnw.
  • CI, release/publish workflows, JitPack, and the release + benchmark scripts are repointed:
    -pl .-pl :graph-compose-core, the reactor gate drops -f aggregator/pom.xml, the
    change-detection filters watch core/src/** + core/pom.xml, the japicmp artifact path moves to
    core/target/japicmp, the engine Maven Central deploy targets -f core/pom.xml (a bare deploy at
    the root would hit the aggregator), cut-release.ps1 bumps + commits core/pom.xml alongside the
    root aggregator pom, and the javadoc doclint gate is scoped to the engine.

Behaviour-preserving choices: the CI guards job and the javadoc gate are explicitly scoped to
:graph-compose-core so a bare reactor pass doesn't change which tests/modules they cover.
docs/contributing/release-process.md and the CONTRIBUTING branch-routing table / README module map
are updated in their own follow-up PRs.

Tests

  • Full reactor gate — ./mvnw -B -ntp clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-templates,:graph-compose-testing,:graph-compose-qa,:graph-compose-coverage -am (a bare ./mvnw clean verify at the root now): 1320 tests, 0 failures.
  • ./mvnw javadoc:javadoc -pl :graph-compose-core: clean. examples/ compiles.
  • The guards that resolve repo-root paths (VersionConsistencyGuardTest, PackageMapGuardTest, CanonicalSurfaceGuardTest, DocumentationCoverageTest in core; DocumentationSnippetCompileTest, DocumentationExamplesTest in qa) pass with real assertions — the new RepoRoot/mvnw sentinel resolves the root from each module's basedir.

DemchaAV added 11 commits July 12, 2026 01:44
…root pom

Pure file moves, no content changes: src/ -> core/src/, the graph-compose-core
pom.xml -> core/pom.xml, and the graph-compose-build aggregator pom.xml -> the
repository root. The aggregator/ directory is removed. Wiring updates follow in
the next commits.
Root aggregator modules drop their ../ prefixes (and .. -> core); the four
modules that inherit the aggregator (examples, benchmarks, qa, coverage) point
their parent relativePath at ../pom.xml. `./mvnw validate` resolves the full
reactor from the root.
The documentation / architecture guards assumed the engine module basedir was
the repository root; with the engine in core/ that no longer holds. Add a
RepoRoot resolver (walks up to the Maven wrapper) and repoint the guards' repo-
root reads through it, prefixing the engine's own sources with core/. The qa
RepoPaths locator switches its sentinel from the removed aggregator/pom.xml to
mvnw. VersionConsistencyGuardTest now reads the engine version from core/pom.xml
and treats the root pom.xml as the reactor aggregator.
The change-detection filters (core/perf/jvm) watch core/src/** + core/pom.xml;
the reactor gate drops -f aggregator/pom.xml (the root pom is the reactor now);
-pl . becomes -pl :graph-compose-core for the engine-scoped steps; the japicmp
artifact path moves to core/target/japicmp; and the engine Maven Central deploy
targets -f core/pom.xml (a bare deploy at the root would hit the aggregator).
cut-release.ps1 bumps and commits core/pom.xml (the engine) alongside the root
aggregator pom.xml; the -pl . engine steps in the release/benchmark scripts and
the JitPack install become -pl :graph-compose-core, and JitPack drops the
-f aggregator/pom.xml flag (the root pom is the reactor).
Point the CONTRIBUTING repository map and the doc build commands at the engine's
new home: core-module source links become core/src/..., the -pl . engine builds
become -pl :graph-compose-core, and the repo-map names the root pom.xml as the
reactor with the engine in core/pom.xml. (release-process.md is updated with the
2.0 release flow separately.)
At the core/ layout a bare javadoc:javadoc runs across the whole reactor,
which would also lint the dev-only benchmarks module (not part of the doclint
gate). Scope it to :graph-compose-core, matching the pre-move behaviour when
the repository root was the engine module.
The engine sources moved to core/src/; update the relative markdown links and
inline path references across docs/ that still pointed at the pre-move src/
layout (module-prefixed links to qa/, render-pdf/, etc. are unaffected).
…comments

CanonicalSurfaceGuardTest resolved DocumentationExamplesTest.java under core/,
where it does not exist, so the engine-internals-import check on it was a no-op;
point it at the real qa/ location so the check runs (green). Refresh the japicmp
change-filter comments (core/src, core/pom.xml) and the engine pom's standalone-
build note (-f core/pom.xml).
Tests now run from the core/ module basedir and write their runtime logs to
core/logs/; add it to .gitignore next to benchmarks/logs/, qa/logs/, and
render-pdf/logs/ so the generated logs are never staged.
ab-bench.sh and ab-bench.ps1 check out other branches and build each one, so a
single A/B run can span the layout boundary. The engine reactor coordinate is
-pl :graph-compose-core on the 2.0 core/ line but -pl . on older branches (whose
root pom is the engine). Pick it per checked-out tree by testing for core/pom.xml
instead of hardcoding the 2.0 scope, which failed when the smoke benchmarked the
1.x branches.
@DemchaAV DemchaAV merged commit e1376ad into 2.0-dev Jul 12, 2026
13 checks passed
@DemchaAV DemchaAV deleted the refactor/repository-layout branch July 12, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant