Hello Tobias, Le 17/05/2024 à 15:39, Tobias Hilbricht a écrit :
Dear readers, as my first packaging project I try to package the Zettelkasten Zkn3 app https://github.com/Zettelkasten-Team/Zettelkasten/tree/main and can build it successfully with maven on Debian bookworm. However, trying to package it in a deb with mh_helper, I get this message: In pom.xml: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? org.kohsuke:github-api:jar:1.117 [y/N] >dpkg --search /usr/share/maven-repo/org/kohsuke/github-api/*/*dpkg failed to execute successfullyapt-file search /usr/share/maven-repo/org/kohsuke/github-apiapt-file failed to execute successfullydpkg --search /usr/share/java/github-api.jardpkg failed to execute successfullyapt-file search /usr/share/java/github-api.jarFound perl Found perl Found perl apt-file failed to execute successfully [error] Package perl does not contain Maven dependency org.kohsuke:github-api:jar:1.117 but there seem to be a match If the package contains already Maven artifacts but the names don't match, try to enter a substitution rule of the form s/groupId/newGroupId/ s/artifactId/newArtifactId/ jar s/version/newVersion/ here: Using the suggestions here https://wiki.debian.org/Java/Packaging/FAQ I do not find a corresponding debian package, but on maven it exists: https://mvnrepository.com/artifact/org.kohsuke/github-api
That's right, this artifact is not packaged in Debian. One possibility is to package it if it is really needed. However, I think you can skip it for your build, the classes of org.kohsuke:github-api do not seem to be used anywhere in the software you are interested in. You can simply get rid of this dependency by adding the line
org.kohsuke github-api * * * * to the file debian/maven.ignoreRules (create it, if needed). Make sure you read https://wiki.debian.org/Java/MavenDebianHelper and the examples at https://wiki.debian.org/Java/Packaging/MavenAlso you can look at the sources of other Debian packages using Maven, e.g. junit4, biojava6-live, libdistlib-java, ... to see more examples.
Possibly you will meet other unpackaged artifacts in the dependencies of Zettelkasten, in which case it is good to look at how their classes are used. If not at all, ignoring the artifact as done above is safe.
How can I satisfy the dependency in a Debian way? Thanks for helpful pointers Tobias
Best, -- Pierre
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature