- Forum posts: 2
Feb 23, 2021, 12:01:49 PM via Website
Feb 23, 2021 12:01:49 PM via Website
Our project consists of a java library and a platform-specific binary. The java library launches the binary as a subprocess on every run. The java library is distributed as a Maven module and we need a way to deploy the binaries too. Ideally we'd like Maven to download the binaries to a local path (e.g. under ~/.m2/repository//) and let us launch from there but it seems that one could only package module as zip/jar files in Maven (there is no packaging option to deploy the binaries as is).
We've considered the following options:
Package the binaries into a jar, distribute the jar as a Maven module and on every run extract the binaries from jar into a temp directory and launch it from there. This is the approach we currently take, it requires extracting the binaries every time and doing cleanup on shutdown which is sub-optimal.
Manage the binary components independently from Maven, i.e. require downloading them separately from the Maven module. This obviously requires more work to properly setup the project and keep the binaries version in sync with the java library.
Is there a better way to distribute such binary component with Maven?
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.