On Wed, 2003-12-17 at 16:03, Sonnek, Ryan wrote:
> Great idea Jason, and thanks for the advise.  I would MUCH rather be coding
> java than writing xml.  The lure of Unit testing is also a huge bonus. 
> 
> Ummm....now, how do I go about it?  =)  I'm assuming that I must create an
> Ant Task (don't know how to do this yet), then taskdef it inside my
> plugin.jelly.  is there a developer's HOWTO available (on wiki?).

You definitely don't need and actually don't want an Ant task. Just make
a java bean then from that you can easily use it from jelly and make an
Ant task from it.

Look at the changelog plugin, you can use that as an example of how to
make a plugin where you make a jelly tag that uses an underlying bean.
Line 27 in cvs.

> Ryan
> 
> -----Original Message-----
> From: Jason van Zyl [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 17, 2003 2:12 PM
> To: Maven Developers List
> Subject: Re: jelly intro
> 
> On Wed, 2003-12-17 at 12:02, Sonnek, Ryan wrote:
> > I'm a new plugin developer looking for resources on jelly scripting.  To
> be
> > exact, I'm looking for how to iterate through a list of folders and modify
> > files that match a certain pattern.  any tutorials or examples you could
> > point me to?  I've searched through the plugins I have installed, but
> > haven't found anything yet that matches this.
> 
> I would highly recommend you encapsulate your little tool in a POJO and
> use the POJO from Jelly. So in Jelly you would end up with something
> like:
> 
> <toolbox:fileChanger
>   directory="/my/dir"
>   filepattern="**/*.txt"
>   find="^monkey"
>   replace="donkey"/>
> 
> Then you can easily unit test it. Leverage your knowledge of Java, you
> don't have to program in Jelly and I highly recommend you don't. Jelly
> is an awesome integrator though and that's how you should use it. It's
> dead simple to use a POJO from Jelly.
> 
> > Thanks.
> > Ryan
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to