You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose for this library to adopt MIMA and delegate "maven like" behavior to it. Current landscape of libraries and apps using Aether/Resolver (without Maven but "as in Maven") is very rough, and almost all the apps retry to do the same thing: mimic Maven, and usually they do it wrongly. MIMA offers solution to this.
MIMA is Java 8 library, makes use of latest Resolver versions and makes available all the latest features of it (remote repository filtering, local repository locking, new transport that cuts request count in half and many more).
Basic usage in short: make MIMA context module compile time dependency and use it like this:
To make it work, add any MIMA runtime as runtime-only dependencies you need (you don't need them compile time).
There are 3 runtimes:
embedded-maven - used when running "embedded in maven" (needed if your library is to be used in Maven)
standalone-sisu - used when running "standalone", uses Eclipse Sisu/Guice DI (as in Maven)
standalone-static - used when running "standalone", replacement for deprecated ServiceLocator
Naturally, you only need one "standalone-*" runtime, no need for both, while "embedded-maven" may be always present, as it does not stir any water (does not have any transitive dependencies and "activates" itself ONLY when inside Maven).
As Resolver (not MIMA) uses SLF4J for logging, you also need to provide a back-end for it at runtime (at least noop, as you still have access to listeners).
By using that pattern above, your code is transportable between all use cases and is simply oblivious where it runs: it will run transparently inside or outside of Maven.
The text was updated successfully, but these errors were encountered:
cstamas
added a commit
to cstamas/layrry
that referenced
this issue
May 9, 2023
I'd like to propose for this library to adopt MIMA and delegate "maven like" behavior to it. Current landscape of libraries and apps using Aether/Resolver (without Maven but "as in Maven") is very rough, and almost all the apps retry to do the same thing: mimic Maven, and usually they do it wrongly. MIMA offers solution to this.
https://github.com/maveniverse/mima/tree/main
MIMA is Java 8 library, makes use of latest Resolver versions and makes available all the latest features of it (remote repository filtering, local repository locking, new transport that cuts request count in half and many more).
Basic usage in short: make MIMA
context
module compile time dependency and use it like this:To make it work, add any MIMA
runtime
as runtime-only dependencies you need (you don't need them compile time).There are 3 runtimes:
Naturally, you only need one "standalone-*" runtime, no need for both, while "embedded-maven" may be always present, as it does not stir any water (does not have any transitive dependencies and "activates" itself ONLY when inside Maven).
As Resolver (not MIMA) uses SLF4J for logging, you also need to provide a back-end for it at runtime (at least noop, as you still have access to listeners).
By using that pattern above, your code is transportable between all use cases and is simply oblivious where it runs: it will run transparently inside or outside of Maven.
The text was updated successfully, but these errors were encountered: