build: support running Maven with -T1C - #2407
Open
Stephan202 wants to merge 2 commits into
Open
Conversation
Several `integration-tests` modules consume the output of other reactor modules without declaring a dependency on them. Maven derives the reactor build order solely from directly declared dependencies, so it does not know that those modules must be built first; serial builds happen to work only because of the module ordering. As a result `mvn -T1C package` races, and `mvn -pl <module> -am` leaves the producing modules out of the reactor altogether. `it-spring-boot-smoke-test` receives `prometheus-metrics-core` only transitively, through `micrometer-registry-prometheus`, so neither `mvn -T1C package` nor `mvn -pl integration-tests/it-spring-boot-smoke-test -am` resolves the snapshot. The dependency is declared with the exclusion that `micrometer-registry-prometheus` applies, leaving the resolved set of artifacts, their versions and their scopes unchanged. `it-exporter-test` and `it-no-protobuf-test` run their sample applications from the shaded jars that the `it-exporter-*-sample` and `it-exporter-no-protobuf` modules leave in `target`, a dependency that `ExporterTest` expresses only as a relative filesystem path. The sample modules are therefore declared as test dependencies. Signed-off-by: Stephan Schroevers <stephan.schroevers@teampicnic.com>
Port 4317 is the default OTLP port, so this test fails on any machine that runs a collector. It also collides with itself: `prometheus-metrics-exporter-opentelemetry-shaded` compiles and runs this module's test sources, so the test executes twice per build, concurrently under `mvn -T`. Signed-off-by: Stephan Schroevers <stephan.schroevers@teampicnic.com>
Stephan202
requested review from
dhoard,
fstab,
jaydeluca and
zeitlinger
as code owners
August 21, 2026 21:42
-T1C-T1C
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.
These two changes enable reliably building multiple Maven modules concurrently with
mvn -T. On my laptop-T1Creducesmvn clean installbuild time from 04:03 to 01:29 minutes.Summary of changes:
ExemplarTestcan be executed twice concurrently (once against the shaded artifact). This change also allows one to build the project on a machine that actually runs an OLTP collector.The changes are split across two commits with suitable commit messages, so that rebase-and-merge is possible.