Imagine we have a Lib .jar and two executable jars - App1 and App2 which both depend on the Lib .jar at compile time. Our current situation is that whenever we change the Lib's implementation (while keeping the signatures intact), we also need to change App1 and App2: while the source code in the executables themselves does not change at all, we are still required to update the Lib's version number within each executable's pom file, increase each executable version number, and redeploy them - hefty.
I imagine a better situation in which after changing Lib's implementation, the Lib's jar gets deployed and the executables only need to be restarted on the production environment to pick up those changes - no need to modify each executable's pom; no need to create new executable jars; no need to deploy new executable jars to the prod environment.
How can that better situation be orchestrated? We use Maven as our build system.
Notice that we would prefer an approach in which the lib is loaded in the same JVM as each of the executables - we don't want to have a web service architecture with the Lib's implementation running on another VM.
In addition, consider that we also maintain the executables and we develop them on our desktops i.e within an IDE, run maven commands on the command line, etc and we would like to preserve that ability.
Thanks.