maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: What is maven/jelly equivalent of ant's antcall?
Date Fri, 31 Jan 2003 00:19:57 GMT
To define simple blocks of repeatable code, you can use the simple
<define:script> and <define:invoke> tags.


<define:script var="myScript">
    ... do something here ...

... 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.


<project xmlns:j="jelly:core"

<define:taglib uri="myLibrary">
    <define:tag name="foo">
        <echo>invoked with a = ${a}</echo>

Then to invoke your 'subroutine' (your tag) maybe parameterizing it

    <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.

----- Original Message -----
From: "Colin Sampaleanu" <>
To: "Turbine Maven Users List" <>
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:
> For additional commands, e-mail:

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

View raw message