ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Collins <gareth_coll...@hotmail.com>
Subject Re: Simple IVY and configurations question
Date Fri, 14 May 2010 19:59:01 GMT

Actually, after a little more investigation. I am wondering if this is a bug
in IvyDE. When I run the following from an ant script:

	<target name="resolve" description="--> retrieve dependencies with ivy">
		<ivy:resolve conf="comp"/>
	    <ivy:retrieve />
	</target>

I see 0 files are retrieved:

[ivy:resolve] :: Ivy 2.2.x-local-20100514030408 - 20100514030408 ::
http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file =
/Users/gcollins/.ant/ivysettings.xml
[ivy:resolve] IvySvn Build-Version: 2.1.0
[ivy:resolve] IvySvn Build-DateTime: 2010-04-12 12:09:51
[ivy:resolve] :: resolving dependencies ::
com.antenna#notifications-opc;working@gcollinsmac
[ivy:resolve] 	confs: [comp]
[ivy:resolve] :: resolution report :: resolve 114ms :: artifacts dl 0ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|       comp       |   0   |   0   |   0   |   0   ||   0   |   0   |
	---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: <not important>
[ivy:retrieve] 	confs: [comp]
[ivy:retrieve] 	0 artifacts copied, 0 already retrieved (0kB/12ms)
BUILD SUCCESSFUL

when I change this to use the "test" configuration I see two files are
retrieved:

	<target name="resolve" description="--> retrieve dependencies with ivy">
		<ivy:resolve conf="test"/>
	    <ivy:retrieve />
	</target>

output:

[ivy:resolve] :: Ivy 2.2.x-local-20100514030408 - 20100514030408 ::
http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file =
/Users/gcollins/.ant/ivysettings.xml
[ivy:resolve] IvySvn Build-Version: 2.1.0
[ivy:resolve] IvySvn Build-DateTime: 2010-04-12 12:09:51
[ivy:resolve] :: resolving dependencies ::
com.antenna#notifications-opc;working@gcollinsmac
[ivy:resolve] 	confs: [test]
[ivy:resolve] 	found ch.qos.logback#logback-classic;0.9.21 in ivysvn
[ivy:resolve] 	found ch.qos.logback#logback-core;0.9.21 in ivysvn
[ivy:resolve] :: resolution report :: resolve 205ms :: artifacts dl 4ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|       test       |   2   |   0   |   0   |   0   ||   2   |   0   |
	---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: <not important>
[ivy:retrieve] 	confs: [test]
[ivy:retrieve] 	0 artifacts copied, 2 already retrieved (0kB/20ms)

So is the difference in behaviour a bug...or am I missing something? If
someone could have a look and let me know it would be much appreciated.

thanks in advance,
Gareth Collins


Gareth Collins wrote:
> 
> Hello,
> 
> I am new to IVY...and to IvyDE and I am trying to set up some dependencies
> for compile and some dependencies for unit test. For example, in my
> project logback is only required for unit test and is not required for
> compile. Here is my current file (after many different permutations
> attempted):
> 
> <configurations>
>     <conf name="default" />
>     <conf name="comp" extends="default"/>
>     <conf name="test" extends="default" visibility="private"/>
> </configurations>
> <dependencies>
>         .
>         .
> 	<dependency org="ch.qos.logback" name="logback-classic" rev="0.9.21"
> transitive="false" conf="test->master" >
> 		<artifact name="logback-classic" type="jar" conf="test"/>
> 	</dependency>
> 	<dependency org="ch.qos.logback" name="logback-core" rev="0.9.21"
> transitive="false" conf="test->master" >
> 		<artifact name="logback-core" type="jar" conf="test"/>
> 	</dependency>
> </dependencies>
> 
> To test out that I have this setup correctly I have an "IvyDE Managed
> Dependencies" file on my eclipse classpath. I am swapping between
> configuration "test" and "conf" to test that I see the correct libraries.
> Unfortunately, whatever I choose, I see "logback-core" and
> "logback-classic" on the build path. I know I must be missing something
> truly obvious here, but what am I doing wrong? If someone could point me
> in the right direction, it would be much appreciated.
> 
> Note that I am currently using the latest IvyDE from hudson (as the
> standard 2.1 version did not allow specifying the Ivy file in "Run/Debug
> configurations").
> 
> thanks in advance,
> Gareth Collins
> 

-- 
View this message in context: http://old.nabble.com/Simple-IVY-and-configurations-question-tp28563267p28563755.html
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message