Relix

Install

The library

Relix ships as one artifact, on Maven Central. Add it to a Java 21 project and the engine, the standard function library, the readers for files, web APIs and databases, and the solver come with it.

Add it to your build Maven Central · 1.0.0-rc6
dependencies {
    implementation("com.darkcollective.relix:relix:1.0.0-rc6")
}

Nothing else is needed to resolve it: Maven Central is already a repository your build reads, so the coordinate above is the whole of the setup. The twenty-one modules the engine is assembled from are internal to the build and are not published separately — the module graph is a claim the build enforces about itself, not a set of names a program should depend on.

ojalgo comes with it as an ordinary transitive dependency rather than merged into the jar. Shading it would hide it from your dependency report and from whatever scans that report for vulnerabilities, which is a worse trade than one visible dependency.

A JDBC driver is the one thing that is not included: add the driver for your database alongside it. Getting the library covers both, and shows how to ask a session what it actually found on the classpath.

There is no server to install and no daemon to keep running. Relix runs inside your own program, in your own process, and reads data through the connections you hand it.

Database drivers

The H2 driver is enough to run every example in the manuals. For PostgreSQL, MySQL or anything else, add that database's JDBC driver to your project alongside the artifact above, and Relix will use it. A session downloads nothing on your behalf: what it can reach is what you put on the classpath, and the version relation reports what it actually found.

Building from source

The artifact is what most programs want; building from source is for working on Relix itself, or for depending on a change that is not released. Relix builds with Gradle and targets Java 21; the wrapper provisions the toolchain if your Gradle is configured for it.

./gradlew publishToMavenLocal

That publishes the single artifact named above to your local Maven repository, under the version in the build. Add mavenLocal() to the consuming build's repositories and it resolves from there. ./gradlew build runs the whole test suite, both manuals' examples included: the guide's Java is compiled and run, and the reference's queries are analysed and executed.