Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] filtering artifacts

I am not sure I understand how this all fits together, but I will try to
prototype this later today to see how this all works.

One question before I get too far, though. Is there a central place I
can intercept all requests to local/remote repositories? I am thinking
to block artifacts at repository level to achieve what I need.
Unfortunately, ArtifactRepository interface and remote/local repository
implementations do not appear to provide a way to implement repository
filtering logic.

--
Regards,
Igor

On 2014-09-26, 15:53, Benjamin Bentmann wrote:
Igor Fedorenko wrote:

Unlike maven dependency <excludes> I need suppressed dependencies to be
treated as missing and result in collection (or resolution?) failure, as
if these dependencies were not available from any enabled repository,
local or remote. I also need to report dependency trail that led to the
suppressed dependency, so I can go and fix the poms.

AFAIU, there's nothing there neatly fits your use case.

If you need to report a failure instead of silent suppression, only
thing that comes to mind is using a DependencyGraphTransformer instead
of the DependencySelector, walk the graph (before or after conflict
resolution depending on your exact needs) and have the graph transformer
throw a RepositoryException (similar to the way ConflictResolver can
throw UnsolvableVersionConflictException).

I assume you will still need the VersionFilter to trim version ranges to
not bail when alternative versions are still available.

Further, you might want a DependencyTraverser that blocks child
dependencies (and POM retrieval for them) for blocked artifacts to
optimize network access.


Benjamin
_______________________________________________
aether-users mailing list
aether-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/aether-users


Back to the top