-
Notifications
You must be signed in to change notification settings - Fork 1
Dependency Versions and Overrides
What this page covers: the single source of truth for every dependency version EveryDatabase ships by default, the Java-8 floor behind those choices, and copy-paste recipes for overriding them on a newer JVM. This is the only wiki page that states version numbers — every other page links here rather than restating them.
📌 Note — these are the defaults of the
everydatabase-coreflavor (the recommended one). They reach your classpath as normal POM dependencies, so you override any of them with standard dependency management.everydatabase-libbydownloads the same set at runtime. See Distribution Flavors.
| Dependency | Default version | POM scope | Min Java |
|---|---|---|---|
com.fasterxml.jackson.core:jackson-databind |
2.15.4 |
api (compile) | 8 |
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml |
2.15.4 |
implementation | 8 |
org.mongodb:mongodb-driver-sync |
4.11.2 |
api (compile) | 8 |
com.zaxxer:HikariCP |
4.0.3 |
implementation | 8 |
com.h2database:h2 |
1.4.200 |
runtimeOnly | 8 |
com.mysql:mysql-connector-j |
9.4.0 |
runtimeOnly | 8 |
org.postgresql:postgresql |
42.7.7 |
runtimeOnly | 8 |
org.slf4j:slf4j-api |
1.7.36 |
compileOnly (optional) | 8 |
The EveryDatabase classes themselves are compiled with --release 8, so the whole stack runs on a
Java 8 JVM out of the box. slf4j-api is compileOnly by design — the library probes for SLF4J
reflectively at runtime and no-ops when it's absent, so it never drags a logging framework into your
build. See Logging & Diagnostics.
📌 Note —
mysql-connector-jexcludesprotobuf-java(only the removed X DevAPI referenced it). The MySQL driver is GPLv2 (+ Universal FOSS Exception); this project never bundles it —corereferences it as POM metadata andlibbydownloads it at runtime. Details on Distribution Flavors.
Two of the defaults are deliberately pinned to the last Java-8-compatible line of their library — the majors after them are Java 11 bytecode:
-
HikariCP
4.0.3—5.xis compiled for Java 11. -
H2
1.4.200—2.xis compiled for Java 11.
Pinning them is what lets every backend run on a Java 8 runtime. On Java 11+ you can move to the newer majors (recipes below). Everything else (Jackson 2.15.4, the Mongo driver, both JDBC drivers) is already Java-8-clean at the listed version.
⚠️ Gotcha — H2 1.x ↔ 2.x are not interchangeable on disk. The two majors use incompatible database file formats and slightly different SQL dialects. Never swap the H2 major version over an existing embedded-file database — export and re-import instead. In-memory H2 (jdbc:h2:mem:) has no such concern. See H2.
Declare your own version; Gradle picks the highest by default, and your nearest declaration wins in
Maven. Append !! (Gradle) to force a downgrade.
implementation 'br.com.finalcraft.everydatabase:everydatabase-core:1.0.4'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' // also pull yaml to match
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2'implementation 'com.zaxxer:HikariCP:5.1.0' // Java 11+ (5.x line)
implementation 'com.h2database:h2:2.3.232' // Java 11+ (2.x line) — read the H2 warning above!runtimeOnly 'com.mysql:mysql-connector-j:8.4.0!!' // '!!' forces this exact version in Gradle<!-- Maven: your nearest declaration always wins -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.4.0</version>
</dependency>Only target SQL? Exclude the Mongo driver entirely:
implementation('br.com.finalcraft.everydatabase:everydatabase-core:1.0.4') {
exclude group: 'org.mongodb'
}The same exclude pattern drops any backend driver you'll never touch.
All flavors are published to a public Maven repository:
repositories {
maven { url 'https://maven.petrus.dev/public' }
mavenCentral()
}<repository>
<id>petrus-public</id>
<url>https://maven.petrus.dev/public</url>
</repository>The everydatabase-libby flavor additionally needs https://repo.alessiodp.com/releases/ (for
net.byteflux:libby-core). See Installation and Distribution Flavors.
This is about building the library, not consuming it — consumers only need a Java 8+ runtime.
-
Launch Gradle with JDK 25. The wrapper is Gradle
9.5.1, which runs on a JDK 25 launcher directly. Test code compiles and runs on the Java 25 toolchain. -
Production code targets Java 8.
compileJavais pinned to a Java 17 compiler withoptions.release = 8; the Jabel annotation processor lets Java 17 syntax emit Java 8 bytecode.
See Building from Source.
- Installation — the first dependency block and flavor pick-one guidance.
- Distribution Flavors — core vs libby, the POM scopes, and the GPL/MySQL note.
- H2 — the 1.x↔2.x file-format warning in context, and the no-versioning opt-out.
-
Logging & Diagnostics — why
slf4j-apiis optional and how detection works. - Gotchas & Pitfalls · FAQ / Troubleshooting.
EveryDatabase · Home · made by Petrus Pradella
Getting Started
Core Concepts
Working with Data
Backends
Manager Module
- Caching & References
- Typed References (Ref)
- Caching Managers
- Cache Policies & Freshness
- Cross-Process Cache Sync
- One Entity, Many Databases
Operations
Advanced
Reference
Contributing