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 Colin Fleming <co...@gmail.com> on 2007/08/24 00:25:38 UTC

Retrieve fileset of my own artifacts after publish?

Hi all,

I'm setting up a new Ivy build system now, and I'm interested in how
everyone handles this case. I'm working on getting our tests running and
compiling, and it's proving difficult. We have a lot of Ivy modules, and
each one has a source and test hierarchy. Production source is compiled and
published to a local repo, but when I compile our test code I need to add
the artifact I just produced to the classpath (since the test classes depend
on the production ones). I can't seem to find any way of getting it without
creating a dependency on myself from a test configuration to a runtime one.
I can do this, I guess, but it seems weird. 

Any suggestions?

Cheers,
Colin
-- 
View this message in context: http://www.nabble.com/Retrieve-fileset-of-my-own-artifacts-after-publish--tf4320463.html#a12303303
Sent from the ivy-user mailing list archive at Nabble.com.


RE: Retrieve fileset of my own artifacts after publish?

Posted by Gilles Scokart <gs...@gmail.com>.
Doing that would introduce a circular dependency.  I would rather avoid
that.

Usually, I run the test after a compilation, when the class are still in a
local directory.   So my script just has to include that directory when
compiling/running the test.

If you want to decouple both, and you want to not recompile the sources when
you compile/run the test, I think you could ask to retrieve (or use any
other post-resolve technique) your jar and all dependencies using an inline
resolve (pointing the module to retrieve, with all his dependencies instead
of giving an ivy file).  However, in that scenario you will have to put your
test configuration public.

I never did that myself, but I think it should work.

Gilles


> -----Original Message-----
> From: Colin Fleming [mailto:colin.mailinglist@gmail.com]
> Sent: vendredi 24 août 2007 0:26
> To: ivy-user@incubator.apache.org
> Subject: Retrieve fileset of my own artifacts after publish?
> 
> 
> Hi all,
> 
> I'm setting up a new Ivy build system now, and I'm interested in how
> everyone handles this case. I'm working on getting our tests running and
> compiling, and it's proving difficult. We have a lot of Ivy modules, and
> each one has a source and test hierarchy. Production source is compiled
> and
> published to a local repo, but when I compile our test code I need to add
> the artifact I just produced to the classpath (since the test classes
> depend
> on the production ones). I can't seem to find any way of getting it
> without
> creating a dependency on myself from a test configuration to a runtime
> one.
> I can do this, I guess, but it seems weird.
> 
> Any suggestions?
> 
> Cheers,
> Colin
> --
> View this message in context: http://www.nabble.com/Retrieve-fileset-of-
> my-own-artifacts-after-publish--tf4320463.html#a12303303
> Sent from the ivy-user mailing list archive at Nabble.com.