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
{{ message }}
Repository navigation
Maven: Java tests outside the standard roots are skipped instead of falling back #327
The Maven adapter only recognises sources under src/main/{java,kotlin}, src/test/{java,kotlin} and a plain <testSourceDirectory> (#317). Java or Kotlin files anywhere else in a module are ignored, so a change can miss tests that Maven runs, without falling back:
Test roots added by build-helper-maven-plugin.add-test-source with src/it/java: a library change doesn't select src/it/java/a/AppIT.java, and changing AppIT.java itself gives a selective plan with no tests. With "maven": { "goal": "verify" }, Failsafe runs it.
A parent POM outside the repository (a company parent) that sets <testSourceDirectory> or <sourceDirectory>. DiffCI can't read it, assumes src/test/java, and misses tests under the real root the same way.
Both reproduce on main at 0d145c7 with small synthetic reactors.
Fix (fail closed first):
A module that contains .java or .kt files outside every root DiffCI recognises gets a blocker, for example Maven <pom>: Java sources outside the standard roots require full validation. This one rule covers both cases above, and any plugin we don't know about.
Optionally, after that: read build-helper-maven-pluginadd-source and add-test-source with plain relative paths as extra roots, using the same guards as resolveTestRoot in fix(maven): find tests under a relative <testSourceDirectory> #317, so the common src/it/java layout narrows instead of falling back.
Done when: synthetic fixtures for both cases either select the test under the extra root or fall back, for a library change and for a change to the test file itself. The Maven table in docs/using-diffci.md lists the new reason.
Activity