Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Resolving test dependencies using aether

Hello Benjamin,

> A custom DependencySelector is the way to go. By default, the MavenRepositorySystemSession uses an instance of
> new ScopeDependencySelector( "test", "provided" )
> to kick out transitive test&provided dependencies during the collection process. So I'm interested to hear what exactly you tried in this regard.

Yes, that's what we did, we set a custom DependencySelector and now
it's transitively pulling down the test dependencies of each
dependency. That's actually not the behavior we want (sorry, I was
unclear in the original post). The behavior that we're looking to
mimic with aether is really:

mvn dependency:copy-dependencies

With copying test resources enabled. Is this possible with aether? Thank you.

--
Arthur Kalmenson


On Fri, Oct 21, 2011 at 4:06 PM, Arthur Kalmenson <arthur.kalm@xxxxxxxxx> wrote:
>
> Hello everyone,
> We've been stuck on trying to get aether to resolve all the transitive dependencies a maven project has, including its test resources. We've tried a whole bunch of things, but none of them have worked so far. A simple way of reproducing this is to change the demo ResolveTransitiveDependencies class here: https://github.com/sonatype/sonatype-aether/blob/master/aether-demo/src/main/java/demo/ResolveTransitiveDependencies.java to use the test scope like this: https://gist.github.com/1304798
> It seems that changing the classpathFilter or anything else doesn't affect the result. We've also tried setting custom dependency selectors on the session to try and get it to pull down more dependencies, but that hasn't helped either.
> Is it possible to use aether for this purpose? Any help would be greatly appreciated.
> Thank you
> --
> Arthur Kalmenson


Back to the top