JavaRCA: Java Recipe for Carefree dependency Administration
Modularization and Dependency Management in Java projects does not have to be a mess.
Take a fresh and playful perspective at this topic with the concepts and tools available in and for
modern Java.




Your Java program is made up of JAR files — the modular building blocks of your software.
Most come from open-source libraries, which are easy to add: like jars full of delicious jam, free for
the taking from public repositories.
But over time, these sweet-looking dependencies carry a hidden cost. As libraries evolve, maintenance
becomes a burden. In long-lived projects, dependency management often turns into a tangled mess —
tedious, error-prone, and time-consuming.
With a modern Java toolset, you can avoid that. The JavaRCA recipe provides a clear guideline to help
you do just that.

Get Started: Clarify your choice of Dependency Definition notation
The JavaRCA recipe works with the common approaches to define dependencies in Java projects.
For new projects, it's recommended to use the Java Module System for dependency definition, with Gradle as the build tool.
If you rely on frameworks that don't yet support the Module System well, you may use Gradle plainly.
If you prefer Maven – or if you work on an existing Maven-based project – you can use that too, with or without the Module System.
What matters most is being intentional and aware of your setup.



/* Java Module System¹ */ requires transitive de.javarca.model; requires org.apache.commons.io;
/* Gradle */ api( project(":javarca-model") ) implementation( "commons-io:commons-io" )
<!-- Maven --> <dependency> <groupId>de.javarca</groupId> <artifactId>javarca-model</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </dependency>
¹If you use the Java Module System for dependency definition, you still need Gradle or Maven as build
tool.
You use a GradleX plugin to bridge the Module System with one of the build tools.
You use a GradleX plugin to bridge the Module System with one of the build tools.
The Recipe
Recipe for Carefree Dependency Management
- Decide for one method and define Dependencies between Modules in dedicated filesJava Module System: . . <module-folder>/src/main/java/module-info.javaGradle: . . . . . . . . <module-folder>/build.gradle.ktsMaven: . . . . . . . . <module-folder>/pom.xml
- Version management in a dedicated fileGradle: . . . . . . . . <bom-folder>/build.gradle.ktsDo not mix with 1.Maven: . . . . . . . . <bom-folder>/pom.xml
- Configure each build concern in a dedicated fileGradle: . . . . . . . . <plugins-folder>/<build-concern>.gradle.ktsDo not mix with 1.Maven: . . . . . . . . <configs-folder>/<build-concern>/pom.xml
- Conflict management in a dedicated fileGradle: . . . . . . . . <plugins-folder>/dependency-rules.gradle.ktsDo not mix with 1.Maven: . . . . . . . . <configs-folder>/dependency-rules/pom.xml
- Configure dependency analysis and make it a regular checkGradle: . . . . . . . . <plugins-folder>/quality-check.gradle.ktsMaven: . . . . . . . . <configs-folder>/quality-check/pom.xml
- Configure Renovate or Dependabot for automatic update PRsRenovate: . . . . . . . renovate.jsonDependabot: . . . . . . .github/dependabot.yml
Video Series

What is a Java Module?

Defining Dependencies between Modules

Managing Versions of 3rd party Modules

Using a Build System to retrieve and build Modules

Managing conflicting Modules

Staying carefree by using dependency analysis

Staying carefree through automated updates

The JavaRCA.de recipe
Explore
Dive deeper into Java modularity and Gradle
Presentations
Support
Java and the Java logo are trademarks of the Oracle Corporation.
Gradle and the Gradle logo are trademarks of Gradle Inc.
Apache Maven and the Apache Maven logo are trademarks of the Apache Software Foundation.
Dependabot and the Dependabot logo are trademarks of GitHub Inc.
Renovate and the Renovate logo are trademarks of White Source Ltd.
Site operated by onepiece.Software.