Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] CollectRequest with scope

Thanks,
this pointed me in the right direction.

I've managed to exclude only the "test" scope by creating a new DependencySelector.

        DependencySelector dependencySelector = new AndDependencySelector(new ScopeDependencySelector(
                JavaScopes.TEST), new OptionalDependencySelector());
        session.setDependencySelector(dependencySelector);

Thanks again
Johannes

23. Mai 2013 15:51
Johannes Dorn wrote:


If you don't want dependencies excluded due to their scope, make sure your session's DependencySelector doesn't include ScopeDependencySelector.


Benjamin

_______________________________________________
aether-users mailing list
aether-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aether-users
23. Mai 2013 14:59
Hi,

when doing a RepositorySystem.collectDependencies(CollectRequest) call, you only get dependencies with a "compile" or "runtime" scope.
Is there a way to collect "provided" or any kind of dependencies?

        Dependency dependency = new Dependency(root, JavaScopes.PROVIDED);
        CollectRequest collectRequest = new CollectRequest(dependency, repositories);
        CollectResult collectResult = repositorySystem.collectDependencies(session, collectRequest);

With this code, i don't get the "provided" dependencies of the root artifact.

Thanks
Johannes

--
Johannes Dorn

Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Tel: +49 6151 2767092
http://www.codetrails.com

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940



Back to the top