ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garima Bathla <>
Subject Re: Maven "classifier" ==> Ivy "?"
Date Fri, 22 May 2009 18:57:41 GMT
Interesting question and I just bumped into an answer for this question last
night in my own little research.

In IVY there is a concept of classifier , but this is only valid within a
dependency - and you have to map classifier to your namespace to make sure
ivy.xsd doesn't complains about malformed xml

So to precisely solve your problem you will have to do the following :

1. Change the resolver artifact pattern to  include classifier in it - this
will help ivy to replace a classifier with a value from ivy.xml if it exists
, if it doesn't it will be ignored (anything in parenthesis is optional).


2.  Change your module descriptor such that you explicityly mention that you
do not want to download source, but only binaries:

   <dependency org="commons-lang" name="commons-lang" rev="2.0">
      <artifact name="commons-lang" type="jar"/>
     <!-- <artifact name="common-lang" type="source" ext="jar"
m:classifier="sources"/> --> -- This is exactly you should not have in your

So this way of writing ivy.xml tells ivy explicitly what to do with
classifier - in this case since you will not be using it ivy will only
download artifacts of type-> jar and not ALL.

On Fri, May 22, 2009 at 11:34 AM, Jim Garrison <>wrote:

> A Maven dependency defines groupId, artifactId, version and "classifier".
> The first three map top Ivy's organization, name and revision.  What name
> does Ivy use for the "classifier"?
> Specifically, I have
>        <dependency org="commons-lang" name="commons-lang" rev="2.0"/>
> which is downloading both the jar (which I want) and sources (which I don't
> need).  How do I exclude the sources?

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