You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by fnord <li...@libertylost.org> on 2009/03/31 23:06:16 UTC

Why am I getting some source jars and some runtimes?

My ivy.xml (with a few dependencies removed for brevity) looks like this:

<ivy-module version="2.0">
    <info organisation="espn" module="espn_itk_core"/>
    <configurations>
        <conf name="runtime" description="" />
    </configurations>
    <dependencies>
        <dependency org="commons-beanutils" name="commons-beanutils"
rev="1.7.0"/>
        <dependency org="commons-digester" name="commons-digester"
rev="1.6"/>
        <dependency org="commons-collections" name="commons-collections"
rev="3.2"/>
        <dependency org="commons-logging" name="commons-logging" rev="1.1"/>
    </dependencies>
</ivy-module>

I'm getting runtime jars for everything but commons-digester, which is
giving me a source jar.

Am I missing something?


thanks,
fnord
-- 
View this message in context: http://www.nabble.com/Why-am-I-getting-some-source-jars-and-some-runtimes--tp22813045p22813045.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Why am I getting some source jars and some runtimes?

Posted by Daniel Becheanu <da...@gmail.com>.
Are you using the above for an ivy:retrieve? If so you can use "type"
attribute to get the artifact instead of source/javadoc. (jar for your
artifact).
Also you can control the retrieve pattern to be able to distinguish
between artifact types.
<ivy:retrieve pattern="${lib.dir}/[type]/[artifact]-[revision].[ext]"/>


Daniel

On Wed, Apr 29, 2009 at 4:10 PM, fnord <li...@libertylost.org> wrote:
>
>
> This took care of it for me, thanks. Between this and setting
> "transitive="false", Ivy has become very useful for me.
>
>
> Benjamin Damm-3 wrote:
>>
>> Hi there fnord,
>>
>>   I'm going to guess that you are collapsing your classpath via a copy
>> operation, and you're ending up with some of the jars being source and
>> some of
>> them being runtimes, is that right?  Further, I'm going to assume you got
>> your
>> jars from maven, perhaps via the ivy:install task?   Is that right?
>>
>> If so, then what is happening is:
>>
>> - The jars from maven have many configurations, one of which is source,
>> and
>> includes the source jar.
>> - The default configuration mapping is *->*
>> - Therefore, by default ivy includes all artifacts.
>>
>> So, if you add something like:
>>
>>      <configurations defaultconfmapping="default->default">
>>          <conf name="default" />
>>      </configurations>
>>
>> Then you should be good.
>>
>> (change the conf name as per your requirements)
>>
>> Cheers
>> -Ben
>>
>> --
>> Benjamin Damm
>> Silver Spring Networks
>> 650-298-4200 x201
>>
>>
>> On Tuesday 31 March 2009 14:06:16 fnord wrote:
>>> My ivy.xml (with a few dependencies removed for brevity) looks like this:
>>>
>>> <ivy-module version="2.0">
>>>     <info organisation="espn" module="espn_itk_core"/>
>>>     <configurations>
>>>         <conf name="runtime" description="" />
>>>     </configurations>
>>>     <dependencies>
>>>         <dependency org="commons-beanutils" name="commons-beanutils"
>>> rev="1.7.0"/>
>>>         <dependency org="commons-digester" name="commons-digester"
>>> rev="1.6"/>
>>>         <dependency org="commons-collections" name="commons-collections"
>>> rev="3.2"/>
>>>         <dependency org="commons-logging" name="commons-logging"
>>> rev="1.1"/> </dependencies>
>>> </ivy-module>
>>>
>>> I'm getting runtime jars for everything but commons-digester, which is
>>> giving me a source jar.
>>>
>>> Am I missing something?
>>>
>>>
>>> thanks,
>>> fnord
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Why-am-I-getting-some-source-jars-and-some-runtimes--tp22813045p23302391.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>

Re: Why am I getting some source jars and some runtimes?

Posted by fnord <li...@libertylost.org>.

This took care of it for me, thanks. Between this and setting
"transitive="false", Ivy has become very useful for me.


Benjamin Damm-3 wrote:
> 
> Hi there fnord,
> 
>   I'm going to guess that you are collapsing your classpath via a copy 
> operation, and you're ending up with some of the jars being source and
> some of 
> them being runtimes, is that right?  Further, I'm going to assume you got
> your 
> jars from maven, perhaps via the ivy:install task?   Is that right?
> 
> If so, then what is happening is:
> 
> - The jars from maven have many configurations, one of which is source,
> and 
> includes the source jar.
> - The default configuration mapping is *->*
> - Therefore, by default ivy includes all artifacts.
> 
> So, if you add something like:
> 
>      <configurations defaultconfmapping="default->default">
>          <conf name="default" />
>      </configurations>
> 
> Then you should be good.
> 
> (change the conf name as per your requirements)
> 
> Cheers
> -Ben
>    
> -- 
> Benjamin Damm
> Silver Spring Networks
> 650-298-4200 x201
> 
> 
> On Tuesday 31 March 2009 14:06:16 fnord wrote:
>> My ivy.xml (with a few dependencies removed for brevity) looks like this:
>>
>> <ivy-module version="2.0">
>>     <info organisation="espn" module="espn_itk_core"/>
>>     <configurations>
>>         <conf name="runtime" description="" />
>>     </configurations>
>>     <dependencies>
>>         <dependency org="commons-beanutils" name="commons-beanutils"
>> rev="1.7.0"/>
>>         <dependency org="commons-digester" name="commons-digester"
>> rev="1.6"/>
>>         <dependency org="commons-collections" name="commons-collections"
>> rev="3.2"/>
>>         <dependency org="commons-logging" name="commons-logging"
>> rev="1.1"/> </dependencies>
>> </ivy-module>
>>
>> I'm getting runtime jars for everything but commons-digester, which is
>> giving me a source jar.
>>
>> Am I missing something?
>>
>>
>> thanks,
>> fnord
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-am-I-getting-some-source-jars-and-some-runtimes--tp22813045p23302391.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Why am I getting some source jars and some runtimes?

Posted by Benjamin Damm <bd...@silverspringnet.com>.
Hi there fnord,

  I'm going to guess that you are collapsing your classpath via a copy 
operation, and you're ending up with some of the jars being source and some of 
them being runtimes, is that right?  Further, I'm going to assume you got your 
jars from maven, perhaps via the ivy:install task?   Is that right?

If so, then what is happening is:

- The jars from maven have many configurations, one of which is source, and 
includes the source jar.
- The default configuration mapping is *->*
- Therefore, by default ivy includes all artifacts.

So, if you add something like:

     <configurations defaultconfmapping="default->default">
         <conf name="default" />
     </configurations>

Then you should be good.

(change the conf name as per your requirements)

Cheers
-Ben
   
-- 
Benjamin Damm
Silver Spring Networks
650-298-4200 x201


On Tuesday 31 March 2009 14:06:16 fnord wrote:
> My ivy.xml (with a few dependencies removed for brevity) looks like this:
>
> <ivy-module version="2.0">
>     <info organisation="espn" module="espn_itk_core"/>
>     <configurations>
>         <conf name="runtime" description="" />
>     </configurations>
>     <dependencies>
>         <dependency org="commons-beanutils" name="commons-beanutils"
> rev="1.7.0"/>
>         <dependency org="commons-digester" name="commons-digester"
> rev="1.6"/>
>         <dependency org="commons-collections" name="commons-collections"
> rev="3.2"/>
>         <dependency org="commons-logging" name="commons-logging"
> rev="1.1"/> </dependencies>
> </ivy-module>
>
> I'm getting runtime jars for everything but commons-digester, which is
> giving me a source jar.
>
> Am I missing something?
>
>
> thanks,
> fnord