You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raja Nagendra Kumar <Na...@tejasoft.com> on 2009/09/05 21:14:44 UTC

how get ant implicit objects in groovy scripts

Hi,

in ant with groovy integrated task definition and its libraries

in build.xml in one of the macrop

<macrodef name="printImplicitOjbectXML">
	<sequential>
<groovy>
println(project);
	    </groovy>
	</sequential>
    </macrodef>


This prints the java reference value of project but the same in groovy
script  file fails.

In script named A.groovy

public static final void printImplcitObject()
{
println(project);
}

This fails saying project undefined.

Could any one tell me how to get these implicit objects with out having to
pass them from build.xml files as method calling parameter.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: http://www.nabble.com/how-get-ant-implicit-objects-in-groovy-scripts-tp25311530p25311530.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: how get ant implicit objects in groovy scripts

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Groovy experts.. pl. answer.. my scripts are becoming so bad that every
method has one parameter project..

-- 
View this message in context: http://www.nabble.com/how-get-ant-implicit-objects-in-groovy-scripts-tp25311530p25422222.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org