The reason is that ant properties may have names
that are not valid variable names in the the various
scritpting languages - so ant only makes variables
out of the properties that have a chance of being
a valid variable name in most lanuages.

for example:
$ant.working.dir is not a valid ruby global variable name.

Peter


On 11/30/06, Rebhan, Gilbert <[EMAIL PROTECTED]> wrote:

Thanks a lot Peter !!

Didn't realise it would be that easy

In the meantime i tried with

<script language="ruby">
            <![CDATA[
            require 'java'
            antworkingdir=$project.getProperty "ant.working.dir"
            jversion=$project.getProperty "java.version"
            puts antworkingdir
            puts jversion
            ]]>
        </script>

putting the dotted properties into strings, which worked too.
so i was already on the right way ;-)

But it's funny that undotted properties can be used
by ruby right away with $propertyname,
whereas dotted properties have to be called
with getProperty method.

Regards, Gilbert

-----Original Message-----
From: Peter Reilly [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 30, 2006 10:11 AM
To: Ant Users List
Subject: Re: [script]masking dotted ant properties ?

There is no syntax for the dotted properties.
The only properties that are set in
scripts are those that have "java identifier" like
names.

Use:

<script language="ruby">
   puts $project.getProperty('ant.working.dir')
</script>

---------------------------------------------------------------------
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]

Reply via email to