Skip to main content

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

Igor Fedorenko wrote:

This mostly works, but these filter&transform callbacks do not have
access to artifact contents and can't be used to do content-based
filtering, like sha1 validation, as far as I can tell.

That's correct, the mechanisms we talked about earlier affect the part of the process where only the metadata is consulted to build the graph, the actual artifacts aren't in the picture at that point.

I can
post-process resolution results to remove unwanted artifacts, but I see
no way to evaluate pom.xml contents, short of providing custom
ArtifactResolver implementation (which javadoc explicitly says I should
not do).
[...]
I think both these problems can be solved by filtering artifacts in
ArtifactResolver, but I don't see a way to do this. Is the an API I
overlook? If there isn't, do you think it makes sense to add such API?

There is no hook in the ArtifactResolver for your use case that you overlook. So yes, short-term you might need to run with your own impl, longer-term adding a new hook in there sounds reasonable.


Benjamin


Back to the top