Message-ID: <1220678788.2487.1432881709246.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2486_1652946340.1432881709245" ------=_Part_2486_1652946340.1432881709245 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Groovy closures by default have a single parameter even if you d= on't specify one. This means that the Gant target:=20 =20
is not an error because it is the name of the implicit paramete= r. When executed the above will print out=20
The implicit parameter is a reference to a map with various key--value p= airs, one of which is the name of the target. Gant is using the implicit pa= rameter feature of Groovy to allow access to information about the target. = Hence:=20 =20
the code in the target closure can use the name and description of the t= arget, in a target name independent way.=20
In version of Gant prior to 1.5.0, various tricks could be played using = the implicit parameter to Gant targets =E2=80=93 targets were not nullary f= unctions but single parameter functions. This facility has been withdrawn a= s of Gant 1.5.0, targets are nullary functions. So prior to Gant 1.5.= 0, you might have seen things like:=20 =20
or even:=20 =20
but these no longer do what they used to. As of Gant 1.5.0 any parameter= s to the call of a target is ignored: the parameter to the target always re= fers to the map containing information about the target.