Bug#1143150: Follow maintainer-supplied maven-repo path

Jérôme Charaoui <[email protected]> Fri, 31 Jul 2026 00:44:50 -0400
Newsgroups gmane.linux.debian.devel.java
Message-ID <6f00d9c2-92ee-4751-a56f-211f7b7ee52c__31277.2291641281$1785473250$gmane$org@riseup.net>
Package: maven-debian-helper
Version: 2.6.9
Severity: wishlist
Tags: patch

Hello,

I've been working on updating a Clojure source package (ring-clojure) 
that builds multiple binaries via a number of POMs andI would very much 
like to avoid the need to hardcode the binary package dependencies in 
the package control file.

Normally, mh_resolve_dependencies is the right tool for this, but I hit 
a bug where it couldn't locate dependencies that are built in the same 
source package. Only packages installed in the chroot before starting 
the build are detected, resulting in an incomplete maven:Depends substvar.

At the same time, in order to make dependency resolution work with 
Leiningen, I already duplicate /usr/share/maven-repo under the 
debian/maven-repo directory with additional symlinks for the newly built 
artifacts.

Unfortunately I couldn't find a way to point mh_resolve_dependencies to 
this "augmented" maven-repo, even though the DependencySolver class 
supports a --maven-repo command-line argument.

After some investigation I noticed a code comment that suggest this is a 
known issue. So I'd like to submit a patch [0] that does just that: make 
the --maven-repo argument work correctly, while of course defaulting to 
the normal behavior of using /usr/share/maven-repo.

[0] 
https://salsa.debian.org/java-team/maven-debian-helper/-/merge_requests/7

It provides a very handy workaround for some complex multi-POM source 
packages that will help ensure the Depends: field is always accurate.

Thank you!


-- Jérôme