On 15/12/2022 16:12, Polarian wrote:
I have discovered an annoying issue with java within the AUR.
One of the projects I aim to wrap is written in java, however it contains a lot of other dependencies in java, and I have been thinking about the idea of how to package, and installing a jar with all the dependencies compressed within it defeats the purpose of packaging.
I assume I should have each dependency as its own package, which means its more maintainable and each dependency can be bumped manually, but I doubt it is conventional to put .jar's in with shared objects (.so) within the libraries directory.
Does anyone have any ideas how you would package a large Java codebase with the dependencies separated to be more maintainable?
Usually large scale Java project use a build tool to build and pakcage such as maven or gradle. It falls usually on the build tool to package the program and its dependencies and create a "distribution" tar.gz or zip file which you could use for deployment. You can check how we deal with Java applications in our repositories.
For a more details answer and suggestions please reference the project you intend to package.