ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: [script]masking dotted ant properties ?
Date Thu, 30 Nov 2006 09:10:30 GMT
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>


On 11/30/06, Rebhan, Gilbert <Gilbert.Rebhan@huk-coburg.de> wrote:
>
> Hi,
>
> i use jruby with the <script> task in ant.
>
> jruby 0.9.1 / ant 1.6.5 / jdk 1.4.2_05
>
> works fine, but i have problems, when it
> comes to dotted properties.
>
> example =
>
> <!-- // Properties -->
> <property name="ant.working.dir" value="Y:/workingdir"/>
> <property name="mlabel" value="v_1_2_3_4_5"/>
> <property name="mname" value="web_controlling"/>
> <property name="mytime" value="30112006"/>
> <property name="lum" value="TS"/>
> <!-- Properties // -->
>
>         <script language="ruby">
>             <![CDATA[
>                 puts $mname
>                 puts $mlabel
>                 puts $mytime
>                 puts $lum
>             ]]>
>         </script>
>
> OK, but when using
>
>  <script language="ruby">
>             <![CDATA[
>                 puts $mname
>                 puts $mlabel
>                 puts $mytime
>                 puts $lum
>                 puts $ant.working.dir
>             ]]>
>         </script>
>
> or puts with $ant.home or $java.version i get =
>
> BUILD FAILED
> org.jruby.exceptions.RaiseException: <script>:6: syntax error, expecting
>
> kCLASS ...
> ... tQWORDS_BEG but found tDOT instead
>
>
> What's the syntax for masking those '.' ?
>
>
> Regards, Gilbert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message