Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
os-maven-plugin
A Maven plugin that sets various useful properties detected from ${os.name} and ${os.arch} properties.
foo is the artifact needed by my project, baz. It is configured to be deployed to my project, baz's lib folder as a monolithic jar. I've used the flatten plugin to strip foo's pom from its dependencies, so that bar will not be known at compile time to whomever uses foo.
The next solution, which is the one I'm writing about. Is to modularize foo's jar, this is easily accomplished using the moditect plugin. But it can be tricky since I don't have, nor do I need, bar, and I prefer doing most of the work in build time and not manually.
The junit-platform plugin requires some tweaking so it can see the new module:
We can accomplish this by leveraging the gmavenplus plugin to execute a small groovy script. To better accommodate both Windows and Non-Windows os families, we'll use the os plugin to create the os.detected.name.