Hey everyone,
We just published version v1.8.0 of JPersist, an open-source ecosystem of highly optimized, Configuration Cache-compliant Gradle plugins designed to automate enterprise Jakarta Persistence (JPA) configurations.
In this release, we didn't just add features (like full Apache OpenJPA toolset orchestration) — we deep-dived into advanced Gradle task engineering to fix common continuous integration pain points.
The Problem: Aggressive Compiler Erasures & CI Pipeline Crashes
When writing custom incremental tasks that process bytecodes, pointing your task @InputDirectory to the compiler's output directory (build/classes/java/main) creates an incremental bottleneck. Why? Because whenever a single file changes, JavaCompile wipes out the whole folder, destroying Gradle's historical file snapshots and causing an incremental cache miss.
Furthermore, running isolated worker actions by injecting text coordinates (group:artifact:version) frequently crashes headless CI nodes if those artifacts aren't fully synchronized on Maven Central yet or if mavenLocal() access is disabled.
How JPersist v1.8.0 Solves This:
-
Source-Driven Incremental Auditing: Our verification tasks (
validatePersistenceSchemaandlintNamedQueries) now track flat file collection streams fromsourceSet.java.sourceDirectories. Because source folders are never deleted by the build, our delta tracking remains 100% stable and fast. -
ClassLoader Harvesting: Our plugins now dynamically query their own active ClassLoader at execution time to harvest the physical
.jarfile protection domains of our tools API. We pass these raw file handles directly to the isolatedWorkerExecutor. Zero network calls, zero resolution exceptions. -
Container-Friendly Scopes: We restricted dynamic injection to
compileOnlyandannotationProcessor. Your packaged WAR and EAR files remain clean, lightweight, and completely free of runtime classpath pollution.
If you are dealing with complex multi-module setups, multi-tenant databases, or looking to streamline your build performance, we'd love for you to check it out!
🔗 GitHub Organization: https://github.com/jpersist
🔗 Main Repository & Templates: https://github.com/jpersist/persistence
Top comments (0)