'Maven - deliver jar files with OS indication in file name

We provide a library and want to deliver jar files with file names based on the OS distribution on which we created the jar files with GraalVM. We have same code but build the jars on different platforms and then we would like to see automagically proper file names. For example, xxx-1.1-linux.jar and xxx-1.1-windows.jar or something similar for the OS distribution indication. How could that be done best, using shade plugin or assembly plugin or both, or any other way that could be done? Also I would like to know the details in the form of sample pom contents, if possible.

Project https://github.com/ReneUmmels/maventest.git does not do what I want. The SNAPSHOT.jar is installed, while I want SNAPSHOT-windows.jar to be installed:

[INFO] --- maven-install-plugin:2.4:install (default-install) @ histogram-fit-impl ---
[INFO] Installing C:\GITHUB_SAMPLES\maventest\algorithms-native\histogram-fit\histogram-fit-impl\target\histogram-fit-impl-1.1-SNAPSHOT-Windows 10.jar to C:\Users\xxx\.m2\repository\maventest\histogram-fit-impl\1.1-SNAPSHOT\histogram-fit-impl-1.1-SNAPSHOT.jar


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source