On Thu, Feb 25, 2010 at 12:33 PM, Chetan Sarva <csa...@gmail.com> wrote:

> I'm trying to figure out how to properly exclude a transitive
> dependency, particularly when one of them is broken. I've got a simple
> test case:
>
> SPRING_WEB =
> transitive("org.springframework:spring-web:jar:3.0.1.RELEASE").reject
> { |a| a.id == "activation" }
>
> spring-web > jsp-api-2.1 > saaj-api-1.3 > activation-1.0.2
>
> activation-1.0.2 is the broken dep, which I'm trying to reject but
> from what I can tell, when the Artifact instance is first created it's
> being added to the task chain for my project and so even though it
> won't eventually get included in my projects JARs, it still does try
> to download it.
>
> Is there a workaround for this or is it a bug or new use case?
>

It would be a new feature.   Right now, transitive() tries to download all
artifacts in case they bring in more transitive dependencies.  reject() is
called after processing of transitive() so it's already too late.  And
besides, it's unclear whether you would be rejecting just "activation" or
all of its dependencies.

Transitive() is unfinished business and if you want complete transitive
dependency support, your best bet today would be to use the Ivy4r plugin.

alex

Reply via email to