You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2011/09/28 05:00:59 UTC

[lang] getting the tests jar out of a repo with Ivy

Hi All:

Does any one know how to pull down the lang3 tests jar out of Maven Central
with Ivy (from Ant)?

I use:

  <dependency org="org.apache.commons" name="commons-lang3"
conf="...myconfs..." rev="3.0.1"/>

but that does not pull down the tests jar. It does get the jar, Javadoc jar
and sources jar though...

Thank you,
Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] getting the tests jar out of a repo with Ivy

Posted by Matt Benson <gu...@gmail.com>.
On Thu, Sep 29, 2011 at 9:27 PM, Gary Gregory <ga...@gmail.com> wrote:
> On Thu, Sep 29, 2011 at 9:58 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>>
>> On Thu, Sep 29, 2011 at 9:56 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>>
>>> On Wed, Sep 28, 2011 at 12:15 PM, Matt Benson <gu...@gmail.com>
>>> wrote:
>>>>
>>>> On Tue, Sep 27, 2011 at 10:00 PM, Gary Gregory <ga...@gmail.com>
>>>> wrote:
>>>> > Hi All:
>>>> >
>>>> > Does any one know how to pull down the lang3 tests jar out of Maven
>>>> > Central
>>>> > with Ivy (from Ant)?
>>>> >
>>>> > I use:
>>>> >
>>>> >  <dependency org="org.apache.commons" name="commons-lang3"
>>>> > conf="...myconfs..." rev="3.0.1"/>
>>>> >
>>>> > but that does not pull down the tests jar. It does get the jar,
>>>> > Javadoc jar
>>>> > and sources jar though...
>>>> >
>>>>
>>>> Hi, Gary.  You'll most likely need to specify individual <artifact>
>>>> elements to the dependency, e.g.:
>>>>
>>>> <artifact type="jar" ext="jar" />
>>>> <artifact type="test-jar" ext="jar" m:classifier="tests" />
>>>> etc.
>>>>
>>>> This example presumes xmlns:m="http://ant.apache.org/ivy/maven", and
>>>> is untested!  :o
>>>
>>> This worked:
>>>
>>> <artifact type="test-jar" ext="jar" classifier="tests" />
>
> Nope. I got it wrong, IvyDE could resolve this but not from Ant. You must
> use a name attr.

So it works with a name attribute?  Hmmm.

Wait, are you saying the problem is with ivy:retrieve?  In this case
you need to add -[classifier] to the appropriate position in your
artifact pattern.  That's the purpose of the classifier, to further
distinguish a jar that, from Ivy's point of view, has the same @name
as the "binary jar," if you will.  Does that make sense?

Matt

>
> Arg
>
> Gary
>
>>>
>>> Thank you Matt!
>>
>> Now that this works, does this mean that our commons-lang3 POM is missing
>> something in order for a normal Ivy dependency to pull down test jar along
>> with the Javadoc and Sources jar?
>>
>> Thank you,
>> Gary
>>
>>>
>>> Gary
>>>
>>>>
>>>> HTH,
>>>> Matt
>>>>
>>>> > Thank you,
>>>> > Gary
>>>> >
>>>> > --
>>>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
>>>> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>>>> > Blog: http://garygregory.wordpress.com
>>>> > Home: http://garygregory.com/
>>>> > Tweet! http://twitter.com/GaryGregory
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>>> Spring Batch in Action: http://bit.ly/bqpbCK
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> Spring Batch in Action: http://bit.ly/bqpbCK
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [lang] getting the tests jar out of a repo with Ivy

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Sep 29, 2011 at 9:58 PM, Gary Gregory <ga...@gmail.com>wrote:

> On Thu, Sep 29, 2011 at 9:56 PM, Gary Gregory <ga...@gmail.com>wrote:
>
>> On Wed, Sep 28, 2011 at 12:15 PM, Matt Benson <gu...@gmail.com>wrote:
>>
>>> On Tue, Sep 27, 2011 at 10:00 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>> > Hi All:
>>> >
>>> > Does any one know how to pull down the lang3 tests jar out of Maven
>>> Central
>>> > with Ivy (from Ant)?
>>> >
>>> > I use:
>>> >
>>> >  <dependency org="org.apache.commons" name="commons-lang3"
>>> > conf="...myconfs..." rev="3.0.1"/>
>>> >
>>> > but that does not pull down the tests jar. It does get the jar, Javadoc
>>> jar
>>> > and sources jar though...
>>> >
>>>
>>> Hi, Gary.  You'll most likely need to specify individual <artifact>
>>> elements to the dependency, e.g.:
>>>
>>> <artifact type="jar" ext="jar" />
>>> <artifact type="test-jar" ext="jar" m:classifier="tests" />
>>> etc.
>>>
>>> This example presumes xmlns:m="http://ant.apache.org/ivy/maven", and
>>> is untested!  :o
>>>
>>
>> This worked:
>>
>> <artifact type="test-jar" ext="jar" classifier="tests" />
>>
>
Nope. I got it wrong, IvyDE could resolve this but not from Ant. You must
use a name attr.

Arg

Gary


>> Thank you Matt!
>>
>
> Now that this works, does this mean that our commons-lang3 POM is missing
> something in order for a normal Ivy dependency to pull down test jar along
> with the Javadoc and Sources jar?
>
> Thank you,
> Gary
>
>
>> Gary
>>
>>
>>>
>>> HTH,
>>> Matt
>>>
>>> > Thank you,
>>> > Gary
>>> >
>>> > --
>>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
>>> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>>> > Blog: http://garygregory.wordpress.com
>>> > Home: http://garygregory.com/
>>> > Tweet! http://twitter.com/GaryGregory
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
>> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] getting the tests jar out of a repo with Ivy

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Sep 29, 2011 at 9:56 PM, Gary Gregory <ga...@gmail.com>wrote:

> On Wed, Sep 28, 2011 at 12:15 PM, Matt Benson <gu...@gmail.com>wrote:
>
>> On Tue, Sep 27, 2011 at 10:00 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>> > Hi All:
>> >
>> > Does any one know how to pull down the lang3 tests jar out of Maven
>> Central
>> > with Ivy (from Ant)?
>> >
>> > I use:
>> >
>> >  <dependency org="org.apache.commons" name="commons-lang3"
>> > conf="...myconfs..." rev="3.0.1"/>
>> >
>> > but that does not pull down the tests jar. It does get the jar, Javadoc
>> jar
>> > and sources jar though...
>> >
>>
>> Hi, Gary.  You'll most likely need to specify individual <artifact>
>> elements to the dependency, e.g.:
>>
>> <artifact type="jar" ext="jar" />
>> <artifact type="test-jar" ext="jar" m:classifier="tests" />
>> etc.
>>
>> This example presumes xmlns:m="http://ant.apache.org/ivy/maven", and
>> is untested!  :o
>>
>
> This worked:
>
> <artifact type="test-jar" ext="jar" classifier="tests" />
>
> Thank you Matt!
>

Now that this works, does this mean that our commons-lang3 POM is missing
something in order for a normal Ivy dependency to pull down test jar along
with the Javadoc and Sources jar?

Thank you,
Gary


> Gary
>
>
>>
>> HTH,
>> Matt
>>
>> > Thank you,
>> > Gary
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
>> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] getting the tests jar out of a repo with Ivy

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Sep 28, 2011 at 12:15 PM, Matt Benson <gu...@gmail.com> wrote:

> On Tue, Sep 27, 2011 at 10:00 PM, Gary Gregory <ga...@gmail.com>
> wrote:
> > Hi All:
> >
> > Does any one know how to pull down the lang3 tests jar out of Maven
> Central
> > with Ivy (from Ant)?
> >
> > I use:
> >
> >  <dependency org="org.apache.commons" name="commons-lang3"
> > conf="...myconfs..." rev="3.0.1"/>
> >
> > but that does not pull down the tests jar. It does get the jar, Javadoc
> jar
> > and sources jar though...
> >
>
> Hi, Gary.  You'll most likely need to specify individual <artifact>
> elements to the dependency, e.g.:
>
> <artifact type="jar" ext="jar" />
> <artifact type="test-jar" ext="jar" m:classifier="tests" />
> etc.
>
> This example presumes xmlns:m="http://ant.apache.org/ivy/maven", and
> is untested!  :o
>

This worked:

<artifact type="test-jar" ext="jar" classifier="tests" />

Thank you Matt!
Gary


>
> HTH,
> Matt
>
> > Thank you,
> > Gary
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] getting the tests jar out of a repo with Ivy

Posted by Matt Benson <gu...@gmail.com>.
On Tue, Sep 27, 2011 at 10:00 PM, Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
>
> Does any one know how to pull down the lang3 tests jar out of Maven Central
> with Ivy (from Ant)?
>
> I use:
>
>  <dependency org="org.apache.commons" name="commons-lang3"
> conf="...myconfs..." rev="3.0.1"/>
>
> but that does not pull down the tests jar. It does get the jar, Javadoc jar
> and sources jar though...
>

Hi, Gary.  You'll most likely need to specify individual <artifact>
elements to the dependency, e.g.:

<artifact type="jar" ext="jar" />
<artifact type="test-jar" ext="jar" m:classifier="tests" />
etc.

This example presumes xmlns:m="http://ant.apache.org/ivy/maven", and
is untested!  :o

HTH,
Matt

> Thank you,
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org