You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Chetan Sarva <cs...@gmail.com> on 2010/02/25 21:33:19 UTC

Excluding broken/missing transitive dependencies

Hi,

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?

chetan

Re: Excluding broken/missing transitive dependencies

Posted by Chetan Sarva <cs...@gmail.com>.
That makes sense. I'd also be ok with somehow expanding out the full
list of transitive dependencies and then just adding them directly to
my buildfile without transitive(). Shouldn't be too hard to script
that now, perhaps I'll give it a try...

On Thu, Feb 25, 2010 at 8:24 PM, Alex Boisvert <al...@gmail.com> wrote:
> On Thu, Feb 25, 2010 at 12:33 PM, Chetan Sarva <cs...@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
>

Re: Excluding broken/missing transitive dependencies

Posted by Alex Boisvert <al...@gmail.com>.
On Thu, Feb 25, 2010 at 12:33 PM, Chetan Sarva <cs...@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