Re: maven-debian-helper: dependency org.kohsuke github-api not found

Pierre Gruet <[email protected]>
Newsgroups gmane.linux.debian.devel.java
Message-ID <[email protected]>
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 successfully
>> apt-file search /usr/share/maven-repo/org/kohsuke/github-api
> apt-file failed to execute successfully
>> dpkg --search /usr/share/java/github-api.jar
> dpkg failed to execute successfully
>> apt-file search /usr/share/java/github-api.jar
> Found 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/Maven
Also 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
OpenPGP_signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEM8soQxPpC9J9y0UjYAMWptwndHYFAmZHrxwACgkQYAMWptwn
dHa+Xg//eUxCdcVFoR8nkA1VmgwfmkvtI9ELKwWT+N+88OFKkOZmcKCC7OQDEdif
yAtgGW0YWDXzP4Q9lHL12Na15Nq9ZeIRTEswHZEBtEAXtD9qaIfKiNpkly7lAoCQ
Qg6epPtKl0WGo3y/SWDJTFTWUZLYMPgvZUxJeDk062pbGEMJDaoGxNqdD/LCKH6/
/YcZwMr6u7V5HHP1kylT1Rz+0YFgzPsKIjKrZ0+8jy5N61kpqg6/aHEauJihiEFC
DaxulTHdJDgyzK0i7w4ipu/YDYa6t0LfvptKVoQx2Amn3czI7RYEKUl4STQd2qfR
1+dIF3CzuN8jH1YCVcjdDgeN6LbBgQhlmreASxYqRVhJCTqG6iR9WqpMOmE5U0Mt
DNYxHqVKctdwELFNYVlqY9opn8TEpUSrCnhCMEYBo8SWoB67P3teNjMQZXwwVkVr
5RIpZQnbbYTejLobQRaA/b4Efp+J1MyPOQacQYzRb5gPlh6DB//6eTTREWX+2WVo
JSYhGW4aAR0SRDcnCjJObKTBkSs+GLcHCOuTi7xI9iw9sUz1i/li9WHKlX+8M3rS
ncT1NdAYOd7voz6Fmf1M8bcmc8JciIWt7/TqnzkiLTFGzO0xO4tiVEjIJN8CN11n
38BbfqwcpP0ll8kyyG4w+CfsdbfPgY8b3CTkx1xKX09aECQ8vyw=
=5u/A
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.