maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
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.

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" <colinml1@exis.com>
To: "Turbine Maven Users List" <turbine-maven-user@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

Mime
View raw message