You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Lynch <pe...@mindspring.com> on 2003/02/02 07:12:26 UTC

Re: What is maven/jelly equivalent of ant's antcall?

James,

I used this technique in the webserver plugin to output various plugin
configuration error messages.

I could have achieved the same goal other ways but the define taglib worked
flawlessly the first time. A wonderful change when you've been struggling with
jexl expressions failing all over the place like I have.

Maven has it's moments. Thanks for the tip dude!

-Peter

----- Original Message -----
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Turbine Maven Users List" <tu...@jakarta.apache.org>
Sent: Thursday, January 30, 2003 4:19 PM
Subject: Re: What is maven/jelly equivalent of ant's antcall?


> To define simple blocks of repeatable code, you can use the simple
> <define:script> and <define:invoke> tags.
>
> e.g.
>
> <define:script var="myScript">
>     ... do something here ...
> </define:script>
>
> ... then much later...
>
> <define:invoke script="${myScript}"/>
>
>
> If you want much more control and to parameterize the blocks, you can define
> a new tag library with one or more new tags in their own namespace then use
> normal XML attributes to customize the blocks.
>
> e.g.
>
> <project xmlns:j="jelly:core"
>     xmlns:my="myLibrary">
>
> <define:taglib uri="myLibrary">
>     <define:tag name="foo">
>         <echo>invoked with a = ${a}</echo>
>     </define:tag>
>     ...
> </define:taglib>
>
> Then to invoke your 'subroutine' (your tag) maybe parameterizing it
> somewhat...
>
>     <my:foo a="${123-2}"/>
>
> which would output
>
>     invoked with a = 121
>
>
> So there's simple scripts you can just invoke, or more well defined tags
> (optionally with attribute validation) which you can define with Jelly
> script and invoke with parameterized values.
>
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: "Colin Sampaleanu" <co...@exis.com>
> To: "Turbine Maven Users List" <tu...@jakarta.apache.org>
> Sent: Wednesday, January 29, 2003 7:51 PM
> Subject: What is maven/jelly equivalent of ant's antcall?
>
>
> > Ant's antcall task is sometimes used to do 'subroutine' style calls into
> > other targets from one or more locations within an ant build file. To
> > some extent this is not too clean since it mixes up usage of targets as
> > run due to dependencies vs. targets run as subroutines, but it does
> > work. I am trying to figure out the best way to do something similar in
> > Maven/Jelly.
> >
> > One way I can think that should work is to use Jelly's define:tag tag to
> > define a new tag for the funtionality I need, and then just use that tag
> > appropriately... Another way would be to use jeez:target to wrap a goal,
> > and then use antcall to call it.
> >
> > Anybody have any suggestions on the best way to do this?
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-maven-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> turbine-maven-user-help@jakarta.apache.org
> >
>
> __________________________________________________
> 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: turbine-maven-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-maven-user-help@jakarta.apache.org
>