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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]