Hi Mitch, Thank you very much for giving me a bit of your time and expertise!
I read the documentation for the ivy:cachepath operation and got it to work for our project just now. As you mentioned, I no longer need to call ivy:retrieve in our build too (which created duplicate JAR files in the /lib folder of the module). Cheers, Burt On Tue, Jan 5, 2010 at 2:44 PM, Mitch Gitman <[email protected]> wrote: > Burt, you wrote: "I personally think it would be nice if Ivy setup/provided > ANT path elements behind the scenes based on the Ivy configuration groups." > > Ivy does offer this, just not behind the scenes. Look at the ivy:cachepath > Ant task: > http://ant.apache.org/ivy/history/trunk/use/cachepath.html > > This would obviate the need to use the ivy:retrieve task and create all > those lib directories. To me, the use of ivy:retrieve and lib directories > signals that you've kinda, sorta gotten into Ivy, but you haven't > completely > bought into or embraced Ivy yet. You've created a redundant set of > directories to make your file setup look more like the pre-Ivy days. > > Also, about the whole matter of confs extending confs, I know this is very > subjective and not right-or-wrong, but to me the whole idea of having your > test Ivy conf extend your main Ivy conf is a case of meshing two things > together too early. What if you want to see just the dependencies that > apply > to test and not main? You're stuck having to sift through maybe 30 JARs to > see just three. > > Instead have your test Ivy conf pick up test-only dependencies. In other > words, don't let your test conf extend your main conf. When you need to > combine the JARs from both confs in a path, just do it as-needed using > composition. So using the old-fashioned ivy:retrieve and lib dirs, you'd > have: > <path id="classpath.tests.compile"> > <fileset dir="${compileSrcLibDir}"> > <include name="**/*.jar" /> > </fileset> > <fileset dir="${compileTestsLibDir}"> > <include name="**/*.jar" /> > </fileset> > </path> > > Or to use the more direct ivy:cachepath where ivy.src.classpath and > ivy.test.classpath are the paths you've created therein: > <path id="classpath.tests.compile"> > <path refid="ivy.src.classpath" /> > <path refid="ivy.test.classpath" /> > </path> > >
