You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by m k <mk...@gmail.com> on 2006/11/28 19:22:41 UTC

Retrieve Test Dependencies from an Artifact

Hey all,
   Is there a way inside of a goal to retrieve the "test" dependencies of an

Re: Retrieve Test Dependencies from an Artifact

Posted by m k <mk...@gmail.com>.
Apologies for sending an incomplete message.

Here is the message I was trying to send:

I have a situation where I run a custom goal on a project.  Using the
project.getArtifacts() and the "@requiresDependencyResolution test" I am
able to get all of the transitively resolved dependencies.  Based on the
Maven dependency mechanism that list will not contain any of the test
dependencies of the the project's dependencies [1].  Is there a way for me
to retrieve those test dependencies?  As an example for Project A depends on
Project B (compile) which has a test dependency of Project C.  When running
the goal form Project A, I can discover Project B.  Now I want to use
Project B to be able to discover Project C.  Is this possible?  I tried
using the ArtifactResolver but I could not figure out how to have it resolve
dependencies with a scope different than "compile".  It also seems to only
resolve dependencies based on their scope with the current project the goal
is executing on.

If this is impossible or if anyone has any suggestions it would be very
helpful.  Thanks.
Micah


[1] -
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html


On 11/28/06, m k <mk...@gmail.com> wrote:
>
> Hey all,
>    Is there a way inside of a goal to retrieve the "test" dependencies of
> an
>