Maven support?

It looks like the process of getting pulse in Java is to build everything from source. Is there a maven release available such that I can just depend on pre-built binaries? If not, has anyone tried to make a non-public one and could provide guidance? It seems the tricky issue would be putting all the platform-specific binaries into the jar, and extracting them at runtime.

I have never created a maven build or release.
Since Pulse is C++, the release would need to be created for specific operating systems. Would the maven build compile the native code for you?

It is possible to build native code with maven (or gradle, if you prefer), but this is not necessary. The native code could be built any way you please, and incorporated into a jar that gets uploaded to a maven server. It is also not necessary to have a separate release for each platform. E.g., consider the model used by this project, which wraps native sqlite for many platforms for java:

Specifically this class:

The native libs for many platforms are inside the jar, and that class extracts the proper one for the current platform to disk and loads it.

As for how the native libs are built, it appears that this repo has pre-built binaries for each platform already included in the repo (, so presumably the native libs are built through some other process.

What pulse could potentially do is create a pulse.jar for each release that contains the native libs for each of the major platforms, and upload that onto on maven central (or something similar). You also wouldn’t need to have the jar dependencies in your repo, as these could be brought in by maven/gradle.

This is not a big deal for me personally, as I’m just prototyping some stuff. But having something available on maven central or similar is a great way to lower the barrier to people using it.

1 Like