Hello, On 2020-12-07 18:52, Thorsten Glaser wrote: > On Tue, 8 Dec 2020, Roger Shimizu wrote: > >> do you have any suggestion on such case, the autopkgtest for java or >> just maven library pkg? > > Sorry but really none. Those packages I’ve seen so far only worked > because they disabled the tests anyway (mostly because the tests > would have required tons more dependencies). > > You’ll probably have to get maven to prepare the test resources and > compile the tests, but to not compile the rest, and to add the in‐ > stalled library instead to the classpath. But this probably involves > some advanced hackery or writing a Maven extension…
Some time ago I embarked on the primitive hackery of Maven in order to develop a generic tool to support autopkgtests for Maven [1]. I managed to hack together a proof-of-concept implementation [2], which actually worked with some of Maven projects I tried. My idea was to disable the build of "all", remove the sources, patch the pom.xml to use system-provided JARs and run 'mvn' as debhelper would do. However, the more Maven projects I tested, the more complicated the autopkgtest runner grew, to the point I abandoned it. However, looking back it seems worth revisiting, and I would be very happy if someone would pick it up and turn it into something usable in Debian. At least for very simple Maven packages. Please see [1] for very valuable comments from Emmanuel Bourg. [1] https://salsa.debian.org/java-team/maven-debian-helper/-/merge_requests/2 [2] https://salsa.debian.org/merkys/maven-debian-helper/-/blob/autopkgtest-pkg-maven/share/maven-debian-helper/autopkgtest-runner Hope this helps, Andrius