refactor(build): standard Maven layout — engine in core/, aggregator at the root#366
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The repository root doubled as the
graph-compose-coremodule while the full reactor was hiddenin
aggregator/pom.xml, so./mvnw clean verifyat the root silently built only the engine andthe "which pom is the project" story took a paragraph to explain. Standardising the layout before
the release tooling ossifies the paths makes
./mvnw clean verifybuild the whole reactor andremoves 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-corepom.xml→core/pom.xml, and thegraph-compose-buildaggregatoraggregator/pom.xml→ the repository-rootpom.xml. Theaggregator/directory is removed. (481 puregit mvrenames —blame --followintact.)<modules>drop their../prefixes (..→core); the four modules thatinherit it (examples, benchmarks, qa, coverage) point their parent
relativePathat../pom.xml.new
RepoRootresolver walks up to the Maven wrapper, engine-local reads are prefixedcore/,and
VersionConsistencyGuardTestreads the engine version fromcore/pom.xmlwith the rootpom.xmlas the reactor aggregator. The qaRepoPathslocator switches its sentinel from theremoved
aggregator/pom.xmltomvnw.-pl .→-pl :graph-compose-core, the reactor gate drops-f aggregator/pom.xml, thechange-detection filters watch
core/src/**+core/pom.xml, the japicmp artifact path moves tocore/target/japicmp, the engine Maven Central deploy targets-f core/pom.xml(a bare deploy atthe root would hit the aggregator),
cut-release.ps1bumps + commitscore/pom.xmlalongside theroot 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-coreso a bare reactor pass doesn't change which tests/modules they cover.docs/contributing/release-process.mdand the CONTRIBUTING branch-routing table / README module mapare updated in their own follow-up PRs.
Tests
./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 verifyat the root now): 1320 tests, 0 failures../mvnw javadoc:javadoc -pl :graph-compose-core: clean.examples/compiles.RepoRoot/mvnwsentinel resolves the root from each module's basedir.