Hi,

Someone please correct me if I am wrong - but I don't see any way to
simply get a reference to an ordered list of dependencies (using Ant).
 I see there is the ivy:buildlist task, but this assumes you have all
of your dependencies available in a directory somewhere.  I would like
to get this information just by doing a resolve.  I tried using this
task with the cache, like so:

    <ivy:cachefileset organisation="my.org" module="myModule"
inline="true" setid="deps.fileset"/>
    <ivy:buildlist reference="build-path" skipbuildwithoutivy="true">
        <fileset refid="deps.fileset"/>
    </ivy:buildlist>

But this finds nothing because the path to the ivy.xml files is
non-standard in the cache.  Fine, I change it like so:

    <ivy:buildlist reference="build-path" skipbuildwithoutivy="true"
ivyfilepath="../ivys/ivy.xml">
        <fileset refid="deps.fileset"/>
    </ivy:buildlist>

But that isn't going to work either - because the ivy files are stored
in the cache with the version number encoded in the filename.  And it
looks like the 'ivyfilepath' attribute does not accept any sort of
patterns.  I can get it to work if I hard-code the versioned filename
in the cache into the 'ivyfilepath' attribute - but that obviously is
not a solution moving forward.

So - perhaps I should explain what I am trying to do.  I just want to
get an ordered list of module names according to the transitive
dependencies.  This should be doable as the information is all there
after a resolve.  So if A depends on B depends on C, I just want to
get back "A, B, C".  The reason I want this is if I want to build A, I
want to walk the dependencies and trigger remote project builds in the
correct order (C, then B, then A).

Short of actually parsing the ivy files directly in the cache - is
there any way to do this?  This seems like a relatively basic thing to
do - but I don't see an easy way to do it.  Hopefully I am just
missing something obvious.

Thanks,
Mark.

Reply via email to