Quarkus in Multi-Module projects
You are developing a web application using Quarkus that consists of multiple (micro)services and a bunch of supporting libraries. Since maven modules provide sufficient isolation, you decide to use a parent project to keep dependency versions and parameters in sync and a Maven Reactor to build them together.
This blog post is for you. A special thanks to Alexey for helping out.
Moving parts
Our objective is to have a development setup where we can edit any of the services or libraries and then run them individually or all together. Ideally without the need to alter configurations between runs and the ability to deploy the setup using devcontainers (note: that's about the development setup, not about deploying the finished application). There are some moving parts:
- Quarkus CLI or Maven plugin
- Multi-Module Maven to keep libraries and services together and apart
- Maven profiles to conditionally modify maven runs
- Maven's
<pluginManagement>
and<dependencyManagement>
to define configurations without activating them - Your favourite Ide configured for Java and Quarkus
- Understand how VSCode's Tasks work
- Know how to setup DevContainers, especially when you need sidecars
That's a lot, let's dig in.
Read more
Posted by Stephan H Wissel on 28 August 2024 | Comments (0) | categories: Java Maven Quarkus WebDevelopment