ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Filtering optional dependencies of a pom module
Date Mon, 07 Jan 2008 13:01:57 GMT
On Jan 5, 2008 7:59 PM, Hans Dockter <mail@dockter.biz> wrote:

> I have the following probably pretty common use case. It is an issue
> related to maven pom's.
>
> Let's say I declare a dependency on the groovy-all module. The groovy-
> all pom declares 9 optional dependencies. I need one of of the
> optional dependencies for my usage scenario of groovy-all. If you are
> a Maven2 users there is no good way of dealing with this situation.
> What you have to do, is to declare the optional dependency you want
> as a first level dependency in your pom. How can I deal with this in
> Ivy? The module descriptor created out of the pom, has two
> configurations I'm interested in. This is default (Maven's compile
> and runtime scope) and optional (all dependencies declared optional
> in the pom). Now I can do the following:
>
> <dependency org="org.codehaus.groovy" name="groovy-all" rev="1.5.1"
> conf="compile->default,optional"/>
>
> This add all 9 optional dependencies to the compile configuration.
> But I want only one. As I understand Ivy, I can only apply exclude
> and include filtering to the master configuration. In this case that
> would mean I have to add 8 exclude statements to exclude the unwanted
> optional dependencies. Alternatively I could declare include
> statements for all the required dependencies. Both is pretty
> impractical. I would like to declare filters on the dependency
> configuration, to say something like: include MODULE_X of OPTIONAL

How is this different from the use of the include element when declaring the
dependency?

Xavier


>
>
> My work around right now is to do it the same way as I did with
> Maven. Declaring the optional dependency as a first level dependency.
>
> Is there a better solution to this problem or are there plans to
> provide one? I'm happy to file a Jira issue :)
>
> - Hans
>
>
>
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message