You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• On any failing verify run (unit or IT failures):
@@ -195,6 +195,7 @@ Plan
195
195
196
196
* **JDK:** 11 (minimum). The project builds and runs on Java 11+.
197
197
* **Maven default:** run **offline** using `-o` whenever possible.
198
+
* **Maven local repo (required):** always pass `-Dmaven.repo.local=.m2_repo` on all Maven commands (install, verify, plugins, formatting). All examples in this document implicitly assume this flag, even if omitted.
198
199
* **Network:** only to fetch missing deps/plugins; then rerun once without `-o`, and return offline.
199
200
* **Large project:** some module test suites can take **5–10 minutes**. Prefer **targeted** runs.
200
201
@@ -203,14 +204,14 @@ Plan
203
204
`-am` is helpful for **compiles**, hazardous for **tests**.
204
205
205
206
* ✅ Use `-am` **only** for compile/verify with tests skipped (e.g. `-Pquick`):
@@ -219,22 +220,22 @@ It is illegal to `-q` when running tests!
219
220
220
221
## Always Install Before Tests (Required)
221
222
222
-
The Maven reactor resolves inter-module dependencies from the local Maven repository (`~/.m2/repository`).
223
+
The Maven reactor resolves inter-module dependencies from the configured local Maven repository (here: `.m2_repo`).
223
224
Running `install` publishes your changed modules there so downstream modules and tests pick up the correct versions.
224
225
225
-
* Always run `mvn -o -Pquick install | tail -200` before you start working. This command typically takes up to 30 seconds. Never use a small timeout than 30,000 ms.
226
-
* Always run `mvn -o -Pquick install | tail -200` before any `verify` or test runs.
226
+
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install | tail -200` before you start working. This command typically takes up to 30 seconds. Never use a small timeout than 30,000 ms.
227
+
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install | tail -200` before any `verify` or test runs.
227
228
* If offline resolution fails due to a missing dependency or plugin, rerun the exact `install` command once without `-o`, then return offline.
228
229
* Skipping this step can lead to stale or missing artifacts during tests, producing confusing compilation or linkage errors.
229
-
* Never ever change the repo location. Never use `-Dmaven.repo.local=.m2_repo`.
230
+
* Always use a workspace-local Maven repository: append `-Dmaven.repo.local=.m2_repo` to all Maven commands (install, verify, formatter, etc.).
230
231
* Always try to run these commands first to see if they run without needing any approvals from the user w.r.t. the sandboxing.
231
232
232
233
Why this is mandatory
233
234
234
-
- Tests must not use `-am`. Without `-am`, Maven will not build upstream modules when you run tests; it will resolve cross‑module dependencies from the local `~/.m2/repository` instead.
235
-
- Therefore, tests only see whatever versions were last published to `~/.m2`. If you change code in one module and then run tests in another, those tests will not see your changes unless the updated module has been installed to `~/.m2` first.
236
-
- The reliable way to ensure all tests always use the latest code across the entire multi‑module build is to install all modules to `~/.m2` before running any tests: run `mvn -o -Pquick install` at the repository root.
237
-
- In tight loops you may also install a specific module and its deps (`-pl <module> -am -Pquick install`) to iterate quickly, but before executing tests anywhere that depend on your changes, run a root‑level `mvn -o -Pquick install` so the latest jars are available to the reactor from `~/.m2`.
235
+
- Tests must not use `-am`. Without `-am`, Maven will not build upstream modules when you run tests; it will resolve cross‑module dependencies from the configured local repository (here: `.m2_repo`).
236
+
- Therefore, tests only see whatever versions were last published to the configured local repo (`.m2_repo`). If you change code in one module and then run tests in another, those tests will not see your changes unless the updated module has been installed to `.m2_repo` first.
237
+
- The reliable way to ensure all tests always use the latest code across the entire multi‑module build is to install all modules to the configured local repo (`.m2_repo`) before running any tests: run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install` at the repository root.
238
+
- In tight loops you may also install a specific module and its deps (`-pl <module> -am -Pquick install`) to iterate quickly, but before executing tests anywhere that depend on your changes, run a root‑level `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install` so the latest jars are available to the reactor from `.m2_repo`.
238
239
---
239
240
240
241
## Quick Start (First 10 Minutes)
@@ -243,13 +244,13 @@ Why this is mandatory
243
244
* Inspect root `pom.xml` and module tree (see “Maven Module Overview”).
244
245
* Search fast with ripgrep: `rg -n "<symbol or string>"`
Use this exact header for **new Java files only** (replace `${year}` with current year):
426
+
Strict requirement — copy/paste exactly. All new Java source files MUST begin with the exact header below. The text, spacing, punctuation, URL, and SPDX line must be identical. Replace `${year}` with the correct current year at the time the file is created.
Re‑run the **exact** command **without** `-o` once to fetch, then return to `-o`.
549
552
@@ -554,9 +557,9 @@ Do **not** modify existing headers’ years.
554
557
JaCoCo is configured via the `jacoco` Maven profile in the root POM. Surefire/Failsafe honor the prepared agent `argLine`, so no extra flags are required beyond `-Pjacoco`.
0 commit comments