| Name | Groovy Macro |
|---|---|
| Plugin | Java Scripting Plugin |
Description | Documentation | Common parameters | Usage | Security | Open Issues with this component
Description
Java scripting using Groovy
Documentation
- Help available in the notation guide.
Common parameters
Pre-defined variables
- See Java Scripting Plugin
- html - groovy html MarkupBuilder.
Usage
{groovy}
println("Hello world");
{groovy}
{groovy:output=wiki|script=#example.py|var1=test}
{groovy}
{groovy:var1=hello|var2=world}
print "Output parameter"
print var1 + var2
out.println(var1 + var2)
{groovy}
Security
This macro supports Macro Security Plugin.

Comments (6)
Sep 07, 2005
Jason Dillon says:
As noted in the Groovy docs, you need asm jars as well or just use the groovy-al...As noted in the Groovy docs, you need asm jars as well or just use the groovy-all-*.jar instead.
Sep 07, 2005
Bob Swift says:
Thanks Jason. I updated the install notes above and removed my comments.Thanks Jason. I updated the install notes above and removed my comments.
Sep 15, 2005
Bob Swift says:
I had a problem moving a page that used the groovy macro. Atlassian support sugg...I had a problem moving a page that used the groovy macro. Atlassian support suggested the following is needed in the groovy macro before they can determine if there is any problem in the base support.
"1. The groovy macro should catch all exceptions thrown by the groovy interpreter and wrap them in a MacroException, so that they can be reported cleanly."
Nov 24, 2006
Damon Rand says:
Get this error running groovy macros in a personal space.. Error formatting ma...Get this error running groovy macros in a personal space..
Nov 24, 2006
Bob Swift says:
Damon, yes, space name is used to construct class name. Need to do something di...Damon, yes, space name is used to construct class name. Need to do something different for personal space to get rid of the "~". Is easy to fix. Please write up an issue - use the link on the top of this page. Thanks.
Sep 25
patrice saint-louis says:
Why doesn't this print any output on the page? {groovy:output=wiki} closure ...Why doesn't this print any output on the page?
{groovy:output=wiki} closure = { greeting, name \-> println(greeting + name) } closure.call("hello ", "world\!") {groovy}