Java library installation (versioned vs unversioned jar)

Vladimir Petko vladimir.petko at canonical.com
Thu Jan 19 03:13:47 GMT 2023


Hi,

 I am a bit confused how java libraries should be installed.
 The manual states:

Their classes must be in jar archive(s) in the directory
/usr/share/java, with the name
packagename[-extraname]-fullversion.jar. The extraname is optional and
used internally within the package to separate the different jars
provided by the package. The fullversion is the version of that jar
file. In some cases that is not the same as the package version.

Some package must also provide a symbolic link from
packagename-extraname.jar to the most compatible version of the
available packagename-extraname-version.jar files. [1]

But the actual observed result is both:
 picocli-codegen.jar -> picocli-codegen-4.6.2.jar
and
 pegdown-1.6.0.jar -> pegdown.jar

Notice symbolic link created from package-extraname.jar to
package-extraname-fullversion.jar which is vice versa of what is
stated in the guidelines.

I am not sure if it is a bug or a feature for some libraries, so I
would like to ask whether this behaviour is correct.

I have attached a patch to maven-debian-helper that copies
package-extraname-fullversion.jar rather than package-extraname.jar
(just in case it is a bug).

Best Regards,
 Vladimir.

[1] https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: versioned-jar.patch
Type: text/x-patch
Size: 3303 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20230119/366bcf69/attachment.bin>


More information about the pkg-java-maintainers mailing list