Hello:

DependencySelector (
https://maven.apache.org/resolver/apidocs/org/eclipse/aether/collection/DependencySelector.html)
has Javadocs that read (in part): "Decides what dependencies to include in
the dependency graph".

DependencyFilter (
https://maven.apache.org/resolver/apidocs/org/eclipse/aether/graph/DependencyFilter.html)
has Javadocs that read (in part): "A filter to include/exclude dependency
nodes during other operations.".

A DependencySelector is something that is set onto a
RepositorySystemSession and is "called from a hotspot" (i.e. it is central
to how the RepositorySystemSession works).  DependencyFilter is something
that is supplied to (probably among other things) a DependencyRequest (
https://maven.apache.org/resolver/apidocs/org/eclipse/aether/resolution/DependencyRequest.html#DependencyRequest(org.eclipse.aether.collection.CollectRequest,%20org.eclipse.aether.graph.DependencyFilter
).

I'm noticing that when I rely on the default DependencySelector installed
by MavenRepositorySystemUtils#newSession(), which incorporates optionality,
scope, etc., I still get optional dependencies in my collected results.
Shouldn't the session's DependencySelector take care of eliminating
optional dependencies when I ask maven-resolver to resolve my dependencies?

Best,
Laird

Reply via email to