The Java wiki is pretty limited at the moment, especially with regards to usage with Maven (a very common Java packager).
There’s an open issue to add documentation for buildMaven specifically via https://github.com/NixOS/nixpkgs/issues/19741
I took the time however to document the more naiive approach but which doesn’t rely on any 3rd party / community driven integrations.
The solution relies on first capturing all the required dependencies via a fixed output derivation.
I hope anyone who is working with Java & Nix finds it useful.