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: Exclude Clarifications
Date Mon, 14 Jan 2008 09:44:43 GMT
On Jan 11, 2008 5:33 PM, Chris Hane <chrishane@gmail.com> wrote:

> What would the "include" configuration look like.  Building on the
> Hibernate example, I want to include the proxool dependency and exclude
> everything else.
>
> <dependency org="org.hibernate" name="hibernate" rev="3.2.5.ga">
>    <include name="proxool" />
> </dependency>
>
> I grabbed the artifact name from the pom file.  Would that be the correct
> to list the transitive dependencies I want from the hibernate pom?
>
> Actually, I just tried it out and got the following error:
>
> [ivy:retrieve] :: problems summary ::
> [ivy:retrieve] :::: ERRORS
> [ivy:retrieve]  a required artifact is not listed by module descriptor:
> *#*!proxool.*
>
>
> Is this possible with the include setting?

No, the include element can only be used to filter artifacts published by
the dependency, not for transitive dependencies. Only exclude works for
transitive dependencies filtering, and since 1.3 only. You can open an issue
for that, but I'd suggest fixing your metadata instead of trying to
circumvent problems in every module depending on the module.

Xavier


>
> Chris....
>
> Gilles Scokart wrote:
> > When you are facing some bad metadata, I fear that you have no choice
> than
> > fixing them.
> >
> > You can either setup your own repository in which you put the correct
> ivy
> > file (or pom file).
> >
> > If you don't want this, you can use transitive=false, or you have to
> list
> > the dependencies you want to include.
> >
> > There is currently no pattern matching that can be used to to filter the
> > transitive dependencies.
> >
> > Gilles
> >
> > 2008/1/10, lukasbradley <lukas@somnia.com>:
> >>
> >> I would like to exclude all dependencies that are not the concrete
> >> dependency
> >> itself.
> >>
> >> For example, Hibernate 3.2.5 has *tons* of dependencies that I do not
> need
> >> to include.  Great examples are the inclusion of both Proxool and C3P0
> >> database pooling jars.  I don't want those around.
> >>
> >> I have tried the following, without success.  I'm attempting to exclude
> >> everything that isn't from the "org.hibernate" organization.
> >>
> >>         <dependency org="org.hibernate" name="hibernate" rev="3.2.5.ga
> ">
> >>             <exclude org="(?!org.hibernate)"
> matcher="regexp"></exclude>
> >>         </dependency>
> >>
> >> To summarize, I want ONLY the Hibernate 3.2.5 jar to be added as a
> >> dependency, and nothing more.
> >>
> >> Am I on the right track, or is there an easier way to do this?
> >>
> >> Lukas
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Exclude-Clarifications-tp14741551p14741551.html
> >> Sent from the ivy-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>



-- 
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