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 <script> and (j)ruby !?
Date Mon, 14 Aug 2006 15:50:55 GMT

Hi,

just learning ruby and i like it :-)

Until now i used  javascript and groovy for scripting

I'm searching examples of ruby in ant.

f.e. what's the equivalent of =

<script language="javascript">
<![CDATA[
   // overwrite property
  project.setProperty("foobar","bla");
  // new Property
  project.setNewProperty("MyNewProperty", "blabla");
 ]]>
 </script>

with jruby, means how do i access ant classes via (j)ruby ?

or how to do things like =

<script language="javascript">
 <![CDATA[
 echoTask = project.createTask("echo");
 echoTask.setFile(new
java.io.File((project.getProperty("ant.working.dir"))+"/diffinfo.html"))
;
 echoTask.setAppend(true);
 echoTask.addText("<HTML><HEAD></HEAD><BODY><FONT face='ARIAL'>"+"\n");
 echoTask.addText("<b>Hostname =
</b>"+(project.getProperty("host.name"))+ "<br><br>\n\n");
...
ds = diffJars.getDirectoryScanner(project);
files = ds.getIncludedFiles();
 for (var i = 0; i < files.length; i++)
echoTask.addText("<b>"+files[i]+"</b><br>\n");
echoTask.addText("</FONT></BODY></HTML>");
echoTask.execute();
]]>
</script>


Any hints, ideas, examples, urls, docs ?


Regards, Gilbert

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


Mime
View raw message