ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: [script]masking dotted ant properties ?
Date Thu, 30 Nov 2006 09:31:12 GMT
 
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:peter.kitt.reilly@gmail.com] 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message