Dion Gillard schrieb:
This works for me:
result is '${1 + 2}' <set var="x" value="3"/> <set var="y" value="4"/> result is '${x + y}'
Can you simplify your example?
Thank You!
Your example worked for me, too, so I can now look, why the other doesn't work. Most important for me, that I've an example for the correct syntax, and now I know it *must* work - I've a better chance to fix it now.
Thank You for Your help!
Peter
On Sun, 01 Aug 2004 15:13:10 +0200, Peter Nabbefeld <[EMAIL PROTECTED]> wrote:
I've asked to add two int values. Here's some of the code (I've tried different versions - without success):
<j:forEach var="line" items="${pluginIncludeTags}"> <echo>line = ${line}</echo> <j:set var="_cpos" value="${line.indexOf(':')}"/> <!-- j:invokeStatic var="_cpos" className="java.lang.Integer" method="parseInt"> <j:arg type="java.lang.String" value="${line.indexOf(':')}"/> </j:invokeStatic --> <!-- j:set var="_pos" value="${java.lang.Integer.parseInt(line.substring(0, _cpos))}"/ --> <j:invokeStatic var="_pos" className="java.lang.Integer" method="parseInt"> <j:arg type="java.lang.String" value="${line.substring(0, _cpos)}"/> </j:invokeStatic> <j:set var="_lineDir" value="${line.substring(_cpos, _cpos + _pos)}"/> <!-- j:invoke var="_lineDir" method="substring" on="${line}"> <j:arg type="int" value="${_cpos)}"/> <j:arg type="int"><j:expr value="_cpos + _pos"/></j:arg> </j:invoke -->
Peter
Dion Gillard schrieb:
What types are x and y?
On Sun, 01 Aug 2004 14:27:08 +0200, Peter Nabbefeld <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to write a Jelly script for Maven. I've tried "${x + y}" and "${x} + ${y}" as the value argument, both don't work for me. I don't know, if this is a problem with the archaic versions, Maven uses (e.g. ant 1.5.3), or if it is a problem with Jelly/Jexl. If it is a solved problem, please give me the right syntax, so I can file a bug for Maven.
Kind regards
Peter Nabbefeld
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
