Skip to content

HSEARCH-5595 Fix build cache relocatability for checkstyle:check#5091

Merged
marko-bekhta merged 3 commits into
hibernate:mainfrom
marko-bekhta:pr-5067
Apr 14, 2026
Merged

HSEARCH-5595 Fix build cache relocatability for checkstyle:check#5091
marko-bekhta merged 3 commits into
hibernate:mainfrom
marko-bekhta:pr-5067

Conversation

@marko-bekhta
Copy link
Copy Markdown
Member

https://hibernate.atlassian.net/browse/HSEARCH-5595


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


ribafish and others added 3 commits April 3, 2026 16:55
The project-level <resource> pointing at ${rootProject.directory} (to
include LICENSE.txt in META-INF) caused the entire workspace root to be
fingerprinted as a build cache input for all goals consuming project
resources. After a first build, target/ directories appear under the
root, changing the fingerprint and causing cache misses for
checkstyle:check across all 83 modules.

Replace with a dedicated maven-resources-plugin copy-resources execution
that achieves the same result (LICENSE.txt in META-INF) without polluting
the project resource directories.
The HibernateSearchProcessor generates *__.java metamodel files into
target/generated-test-sources/test-annotations. Maven adds this as a
test source root, and the Develocity extension fingerprints the directory
contents as a cache input for checkstyle:check. This causes 4 cache
misses in the metamodel integration test modules because the generated
files only appear after compiler:testCompile runs.

Two fixes:
- Add **/*__.java to checkstyle excludes (skip style-checking generated code)
- Add develocity-custom-user-data.groovy to exclude **/target/** from the
  checkstyle testSourceDirectories cache input fingerprint
… version that handles the userdata for checkstyle
@sonarqubecloud
Copy link
Copy Markdown

@marko-bekhta marko-bekhta merged commit f255bd8 into hibernate:main Apr 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants