Skip to main content

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

I have looked at DependencySelector and DependencyTraverser but I don't
understand how to filter dependencies expressed as version ranges.

For example, lets say there is a dependency junit:junit:[4.0,5) and the
white-list includes junit:junit:4.10 and junit:junit:4.11. Both
DependencySelector and DependencyTraverser are supposed to answer yes or
no for junit:junit:[4.0,5), while I really need to consider versions
4.10 and 4.11.

--
Regards,
Igor

On 2014-09-11, 9:59, Benjamin Bentmann wrote:
Igor Fedorenko wrote:

I have a usecase where I need to filter artifacts based on some
application-level criteria.
...
My resolution code roughly looks like this

     CollectRequest collect = new CollectRequest();
     collect.setRootArtifact( ... );
     collect.setRepositories( ... );
     collect.addDependency( ... );
     result = repoSystem.collectDependencies( session, collect );

Is there a way to stop aether from collecting artifacts not on the
white-list at this point?

Did you look at the DependencySelector [0, 1]? I don't see how your use
case is any different from the way existing dependency exclusions are
implemented.


Benjamin


[0]
http://download.eclipse.org/aether/aether-core/1.0.0/apidocs/org/eclipse/aether/collection/DependencySelector.html

[1] http://wiki.eclipse.org/Aether/Transitive_Dependency_Resolution
_______________________________________________
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