Whilst I’ve been preparing the large dependency chain to support Jenkins for upload into Debian and Ubuntu I came across a new lintian warning:
libakuma-java: missing-classpath libjna-java
This is a new check that validates that the jar files associated with a debian -java package have a Class-Path entry set in the META-INF/MANIFEST.mf file.
This is used by wrapper scripts to dynamically set the classpath for Java applications at runtime based on the libraries that they use.
However, if you are packaging Maven based projects you don’t get this set for free (although that would be a great feature for maven-debian-helper).
Luckily the javahelper package has a CDBS class that can help out; simply add javahelper to the Build-Depends for your package then follow these steps:
Add the javahelper.mk class into the make file:
2) Add a .classpath file for the binary package
In my case this gets dropped into debian/libakuma-java.classpath
Rebuild your package; the jar files should now have Class-Path entries and you should be lintian clean.