This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch quick-fix/develocity-local-cache-opt-in in repository https://gitbox.apache.org/repos/asf/camel.git
commit 498254cd514493bf9a7ac5cbf2f51319601670f7 Author: Claus Ibsen <[email protected]> AuthorDate: Thu Oct 8 09:34:34 2026 +0200 chore: disable local Develocity build cache by default The local build cache replays cached goal results instead of running them, so a local mvn verify can report integration tests as passing without running them again. Make the local cache opt-in through the DEVELOCITY_LOCAL_CACHE_ENABLED environment variable, as Camel Quarkus did in apache/camel-quarkus#8936, and update the building guide accordingly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .mvn/develocity.xml | 2 +- docs/main/modules/contributing/pages/building.adoc | 23 ++++++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.mvn/develocity.xml b/.mvn/develocity.xml index c8b24045c9fa..8ab99c81838f 100644 --- a/.mvn/develocity.xml +++ b/.mvn/develocity.xml @@ -35,7 +35,7 @@ </buildScan> <buildCache> <local> - <enabled>#{isFalse(env['GITHUB_ACTIONS'])}</enabled> + <enabled>#{isTrue(env['DEVELOCITY_LOCAL_CACHE_ENABLED'])}</enabled> </local> <remote> <enabled>false</enabled> diff --git a/docs/main/modules/contributing/pages/building.adoc b/docs/main/modules/contributing/pages/building.adoc index 88617386780e..7c2a84a5dd72 100644 --- a/docs/main/modules/contributing/pages/building.adoc +++ b/docs/main/modules/contributing/pages/building.adoc @@ -52,24 +52,21 @@ the `.mvn/jvm.config` file. [NOTE] ==== -The build uses the Develocity Maven extension (`.mvn/extensions.xml`), which enables a *local* -build cache by default (`.mvn/develocity.xml`) so incremental local builds can reuse unchanged -module outputs. Remote caching is always disabled. If you rebuild a module and your changes don't -seem to take effect -- for example a jar in `~/.m2` doesn't reflect a source change you just -made -- disable the local cache for that build to force a real compile: +The build uses the Develocity Maven extension (`.mvn/extensions.xml`). Its *local* build cache +(`.mvn/develocity.xml`) is disabled by default, because a cached goal is replayed instead of run: +a module can then be reported as built and tested even though its tests did not run again, and a +jar in `~/.m2` may not reflect a source change you just made. Remote caching is always disabled. -[source,bash] ----- -mvn clean install -Pfastinstall -Ddevelocity.cache.local.enabled=false ----- - -To disable it for every local build without changing the command line each time, set it once via -an environment variable (e.g. in your shell profile): +If you want incremental local builds to reuse unchanged module outputs, you can opt in to the local +build cache by setting the following environment variable (e.g. in your shell profile): [source,bash] ---- -export MAVEN_OPTS="$MAVEN_OPTS -Ddevelocity.cache.local.enabled=false" +export DEVELOCITY_LOCAL_CACHE_ENABLED=true ---- + +With the cache enabled, you can still force a real build of a single run with +`-Ddevelocity.cache.local.enabled=false`. ==== == A normal build
