ribafish opened a new pull request, #1028:
URL: https://github.com/apache/ofbiz-framework/pull/1028
## Summary
The `test` task depends on `generateSecretKeys`, which writes new random
values to `framework/security/config/security.properties` on every build. Since
this file is part of the main resource source set (`config/` dirs are included
via `getDirectoryInActiveComponentsIfExists('config')`), changing it causes
cascading Gradle build cache misses for:
- `:compileTestGroovy` — classpath includes main resources
- `:checkstyleMain` — classpath includes `sourceSets.main.output`
- `:checkstyleTest` — same reason
- `:test` — classpath + test classes differ
This PR:
1. **Removes** `dependsOn 'generateSecretKeys'` from the `test` task — the
main `security.properties` is no longer mutated during `build`
2. **Adds** a test-specific `security.properties` in
`framework/security/src/test/resources/` with fixed keys — this shadows the
main config on the test classpath so unit tests that require JWT keys (e.g.
`ModelFormTest`) continue to work
The `generateSecretKeys` task is unchanged and remains available for manual
use (`./gradlew generateSecretKeys`) and as a dependency of `loadAll`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]