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 Sam Berlin <sb...@gmail.com> on 2009/03/09 20:13:33 UTC
Ivy Migration Questions
Hi Folks,
First off -- thanks very much for Ivy. It's looking to be great. I
just have a few questions (that I couldn't find answers for in the FAQ
or Google). My apologies if these are already answered.
We're looking to convert a very ugly set of ant scripts and a neutered
maven setup to a polished Ivy build. Our setup looks something like:
/root/components/<component>
Each component is setup in familiar maven style:
<component>/src/main/java
<component>/src/main/resources
<component>/src/tests/java
<component>/src/tests/resources
<component>/build/classes
<component>/build/tests
Each component has dependencies on some other components plus other
jars (the other jars can either be pulled from a maven repo or local
filesystem).
Right now, the components aren't versioned. There's no real plans for
versioning them, either -- the component-layout exists solely to help
reduce ever-growing dependencies on arbitrary classes & packages.
I would like to be able to say "ant compile" in an arbitrary component
and have that component figure out its dependencies, build them and
build itself. The Ivy-way that I can find to do this is to have each
dependency publish a "local" jar and have Ivy resolve that. This
works, but is it really the only way? Is it possible to tell Ivy, "I
just want to depend on the classes & resources as compiled locally,
not on a published jar". One possible approach I have thought of,
which may be a complete and utter hack, is to use ivy:buildlist to get
the dependencies in a classpath form of "<dependency>/src/main/java"
and "<dependency>/src/main/resources".
Is this an issue other people have come across? The main issue, here,
is I don't want to force a publish just to use a dependency. If this
is required, it seems like all build.xml's will require heavy use of
buildlist & subant, and each will need separate targets for "entry
point" and "being called because of subant", where "entry point"
gathers the buildlist and calls the secondary target (so that when a
compile is called from subant, it won't force another buildlist to be
built).
Sorry for the long-winded question -- I hope it makes sense! Please
let me know if I'm thinking about Ivy in the wrong way, or if you have
any advice.
Thanks much,
Sam