From: "Vincent Massol" <[EMAIL PROTECTED]> > I am porting the following code Jelly: > > <parallel> > <antCall target="cactus:tomcat-4x-start"/> > <sequential> > <waitfor maxwaitunit="millisecond" checkevery="500"> > <http > url="http://localhost:${maven.cactus.port}/test/ServletRedirector?Cactus > _Service=RUN_TEST"/> > </waitfor> > <antCall name="cactus:tomcat-4x-stop"/> > </sequential> > </parallel> > > Of course, replacing <antCall> by <attainGoal> will not work (I think > Jelly will execute before Ant, right?).
If you kept the above as using Ant tasks then it would work fine in Jelly. However mixing Maven's <attainGoal> with the Ant tasks probably won't work. > I imagined using the jelly <core:thread> tag. However, I have to specify > either an org.apache.commons.jelly.XMLOutput object or a file attribute. > > I would like to have the output be printed in the console (same as the > other Jelly outputs). How can I do that? I've just patched the thread tag to just default to System.out if no xmlOutput or File is specified. > BTW, is that the correct approach (to use the jelly <thread> tag)? Sure. The missing part that you need is synchronizing things again. There's no <waitfor> in Jelly, though you should be able to reuse the existing Ant tasks for this if you like. There are efforts ongoing to build a BPEL4WS engine using Jelly. One of the key features of this is to support parallel execution of 'actions' and then coordinate them as they complete, either synchronously (via blocking a thread) or asynchronously (via receiving some kind of message and correlating things together). So there will be better support for this kind of thing in Jelly soon. Until then using just the Ant tasks seems the easiest approach; maybe we just need a way of making things like <attainGoal> act like an Ant task when used with <parallel> and <sequential> in a Jelly script? James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
