Hi, I am not sure exactly what you are asking here - if you are asking "How to build an directed acyclic graph?" then there is a package in commons (graph2) that does that and allows different strategies for traversing (pre, post, in) as well as visitor so you can funny walking schemes.
I thought about using for phoenix and some ant stuff but it was overkill. Not sure if it is wjhat you are asking... On Fri, 10 May 2002 02:39, Berin Loritsch wrote: > I am posting this to both Avalon and Krysalis because we suffer from the > same fundamental problem. Excalibur has a recursive build feature for > dependant projects (Is this something centipede can use?), and Centipede > has the need to resolve Cents dynamically. > > Another place where this problem occurred (in the past it is resolved > now) > is in Cocoon's XSP engine. The fundamental problem was that we needed > to > order the XSP logicsheet dependancies without explicitly declaring them > in > the XSP page. We also did not want to depend on the order of the > namespace > declaration. > > An example would be if I wrote my own custom logicsheet, which used the > esql logicsheet, which used the util logicsheet, which used the root > XSP logicsheet. I should only have to declare the page as an XSP > page and declare the namespace for my logicsheet. Cocoon's XSP engine > should perform the resolution. > > The approach developed between myself and Davinum Srinivas (Dims for > short) > was to preload the dependancies, and order them. If my logicsheet said > that > it needed ESQL and Util, the engine would place my logicheet first in > the > list, and then add Util and ESQL in no guaranteed order. If ESQL then > said > it needed Util, then the engine would make sure that Util was applied > after > ESQL. The only template that was guaranteed to be last was the XSP > template. > > In essence, the List was populated something like this: > > MyLogic > + Util-------+ > + ESQL | (it was needed further down the dependancy chain) > + Util <-+ > XSP > > The guarantee was that each logicsheet was applied once and only once. > It > also guaranteed that it was placed where it was needed. > > Now, Avalon and Centipede have slightly different requirements, but the > same type of approach would help both projects. > > Avalon Excalibur's build system needs two new Ant tasks: depcheck, and > depbuild. Depcheck would check a project descriptor for the dependancy > names, their location, and where the jars are created. Depcheck will > decend the dependancy hierarchy and find circular dependancies--throwing > an error if it is detected. Depbuild will use the dependancy list > created > by Depcheck, purge duplicates, and arrange the build order so that the > base dependancies are built first, there is no unnecessary duplication > of builds, and the system is much easier to come to grips with. > > A verbose Ant output would be something like this: > > [depcheck] Finding dependancies: > [depcheck] > [depcheck] fortress > [depcheck] + mpool > [depcheck] + event > [depcheck] + Framework > [depcheck] + event > [depcheck] + logger > [depcheck] + Framework > [depcheck] + Logkit > [depcheck] + etc... > > .... > > [depbuild] Logkit > [depbuild] Framework > [depbuild] logger > [depbuild] event > [depbuild] mpool > [depbuild] etc.... > > > For Centipede, the resolution of build tasks should be done before > they are executed. That way, it can figure out which cents need > to be downloaded, which cents need other cents, and can detect > circular dependancies which will help cent developers. > > A cent circular dependancy would be defined as: > > centipede:compile > junit:test > centipede:compile > > And it would not be defined as: > > centipede:compile > junit:test > centipede:dist > > Do you think that could help things out? > > > "They that give up essential liberty to obtain a little temporary safety > deserve neither liberty nor safety." > - Benjamin Franklin -- Cheers, Peter Donald -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>