ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Shea <>
Subject Figuring out order of dependencies (like graphml).
Date Thu, 13 May 2010 19:52:14 GMT
Hi folks,

I have a bit of a complex issue here, and I'm wondering if anybody has 
recommendations about how I can solve it.

I will start out by describing what I want to do. I have several ivy 
modules which contain javascript files. My build process produces a .war 
file, and needs to concatenate the javascript filse from each module in 
a specific order. Currently, that part of the build process is entirely 
contained in the build process for the .war - so the .war needs to know 
which javascript files to concatenate, in order. I dislike this, because 
it means that the final module needs to know things about the modules it 
is using that it shouldn't need to know.

I would like to make this process more general. ie, I would like each 
javascript module to publish an artifact that contains a list of its own 
javascript files (in the order in which they should be concatenated), 
and then I would like the build for the .war to simply concatenate all 
of these files together in the order provided. I thought of maybe using 
Ivy post-retrieve-artifact triggers for this, but the problem is that 
they are not called in the order that I need. ie:

|-- module-3
|  |-- module-1
|-- module-2
|   |-- module-1

... The order that my triggers fire in is "module 3, module 1, module 2, 
module-1", but I need it to be "module 1, [module-2, module-3]" (the 
order of module 2 and 3 is not important). Either this or exactly the 
reverse, since I could just reverse the ordering easily in code.

ie, the problem is that the triggers seem to fire depth-first, and I 
need *something* that works breadth-first; if it's not triggers and is 
something else, that's fine too.

Clearly it is possible to obtain this information, since that's 
basically the sort of stuff that comes out in the .graphml reports. Does 
anybody have any ideas for how I should approach this problem? Parsing 
the report XML files is doable, but if there's an easier way to solve 
this, I'm all ears =).


Mike Shea.

View raw message