I have a simple problem but being a novice with Maven it's unclear which is the best practice to solve this problem.
A project I'm working has a dependency to manage archives which is the following: net.sf.sevenzipjbindings.
This dependency is made by two artifacts: a pure Java one, which provides the Java interface and another one which is the native underlying code which has many flavours according to the operating system.
At the moment I'm packaging the jar built by maven with all the natives for all the platforms but I'd like to be able to do something like:
- when working (so
compile
goal if I understand correctly) on the project use the all-platforms artifact (so that I can work seamlessly from multiple operating systems - when packaging build 3 different JAR with dependencies composed by the Java interface + a specific platform artifact
This sounds rather simple from my point of view but I'm struggling to understand what I should do and what are the best practices in general. Since here there is no different or modular functionality (like isolating part of the code into a separated module), just a replacement for underlying dynamic libraries.