ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Huang" <judoscr...@hotmail.com>
Subject Re: AW: [Ann] Ant task for the JudoScript language
Date Sat, 07 Aug 2004 02:04:49 GMT
Hi Peter,

These are some of the things I have been looking for, and thank you for 
pointing them to me. I've been limiting myself to Ant 1.5 thus far, and just 
discovered the overwhelmingly resourceful world of 1.6, and agree with you 
(and others) that Ant should manage what is built-in and what not.

Thanks,
-James

>From: Peter Reilly <peter.reilly@corvil.com>
>Reply-To: "Ant Users List" <user@ant.apache.org>
>To: Ant Users List <user@ant.apache.org>
>Subject: Re: AW: [Ann] Ant task for the JudoScript language
>Date: Fri, 06 Aug 2004 18:52:55 +0100
>
>Hi James,
>
>The issue is not how easy it is to add a judoscript task, it is more a 
>question
>of support. If we added this task, we should also do the same for the other
>java scripting languages - beanshell, groovy, javascript, jython, pnuts, 
>ruby and jacl to
>name a few.
>
>The policy now is to try to reduce the number of new tasks in ant to core 
>tasks
>and allow easier intergration of third party tasks using antlibs.
>
>For judoscript this can be achieved by adding the following antlib.xml to 
>com/judoscript in
>the judoscript.jar file
>
><antlib>
>  <taskdef name="judoscript"
>           classname="com.judoscript.AntJudoScriptTask"/>
></antlib>
>
>and use it as follows:
>
><project default="judoscript" xmlns:j="antlib:com.judoscript">
>  <target name="judoscript">
>    <property name="x" value="This is x"/>
>    <j:judoscript>
>      println "Hello x value is ${x}";
>    </j:judoscript>
>  </target>
></project>
>
>This is the way I use the tasks from ant-contrib - which I use in nearly 
>all my build
>scripts.
>
>More examples of languages than javascript need to be added to the <script> 
>and
><scriptdef> pages to show people that ant does support them.
>
>As regards the default language for script one can use a <presetdef> to do 
>this.
>
><presetdef name="judoscript">
>  <script language="judoscript"/>
></presetdef>
>
><judoscript>
>    println "Hello x value is ${x}";
></judoscript>
>
>Of course this does not solve the params issue or the properties issue you 
>have
>identified.
>
>Peter
>
>James Huang wrote:
>
>>Hi, Jan and Peter,
>>
>>Thanks for the responses. Yes I am aware of BSF listing of JudoScript and 
>>the related references in Ant literature. But in using Ant, I found 
>><script> has certain deficiencies, which could be, indeed, those of BSF.
>>
>>The <script> does not take a "params" attribute as <judoscript> does.

>>External scripts would likely take parameters and this seems much needed. 
>>(I need to check if BSF supports that.)
>>
>>When a buildscript uses a scripting language, most likely a single 
>>language will be used. Perhaps you can add something like:
>>
>><script *default_language*="judoscript" />
>>
>>So that the subsequent <script> tags need not to have 
>>language="judoscript" every single time.
>>
>>Now, suppose <script> does have the "params" attribute as I wish, if I can 
>>alias a <script language="judoscript" .../> into a <judoscript .../>,

>>that'd be nice, too. I see that the new <scriptdef> tag looks like that; 
>>perhaps a few more examples may help. But that still requires BSF, an 
>>unnecessary dependency and overhead compared to native language support 
>>like <judoscript>.
>>
>>The biggest problem, however, is the way to pass values through 
>>properties; I used 1.5.4. Ant project internally maintains its own 
>>properties, rather than sharing with the System Properties. I don't see a 
>>need for this but that's the way Ant works now. My JudoScript scripts use 
>>system properties, and they can be run within _and_ outside Ant, so I'm 
>>not motivated to write a duplicate piece of code in the scripts just for 
>>that. To support this, in the com.judoscript.AntJudoScriptTask class, I 
>>have to transfer properties values in and out of Ant from/to system 
>>properties. That makes me itchy, thinking about the performance overhead.
>>
>>So, I created AntJudoScriptTask and <taskdef> it to <judoscript>. I have

>>many complicated build activities, e.g., to generate all the articles, 
>>ref, examples in HTML; automated testing including output comparison, JDBC 
>>scripting testing that requires scripts being run in a certain order, 
>>create various shippable packages, ... Like I said, JudoScript's mission 
>>and focus are for practical uses, and is particularly suited for software 
>>building and testing.
>>
>>I hope that people, especially the Ant team members, discover more about 
>>what JudoScript can do in build process, and make <judoscript> an optional 
>>Ant task. As we all know, Ant is not just for building software, it can 
>>automate any processes; having a direct support for <judoscript> can 
>>certainly help many people and provoke the inner drive to use Ant more. 
>>Not everyone is into make files or build.xml; but once they discover it, 
>>things can quickly change. I will certainly put a lot of literature out 
>>there and this won't hurt. Effort of adding <judoscript> is minimal, and I 
>>don't see a reason not to. Please spare some more thoughts on this, 
>>thanks.
>>
>>Best regards,
>>
>>-James
>>
>>>From: Peter Reilly <peter.reilly@corvil.com>
>>>Reply-To: "Ant Users List" <user@ant.apache.org>
>>>To: Ant Users List <user@ant.apache.org>
>>>Subject: Re: AW: [Ann] Ant task for the JudoScript language
>>>Date: Fri, 06 Aug 2004 09:43:52 +0100
>>>
>>>Jan.Materne@rzf.fin-nrw.de wrote:
>>>
>>>>Ok, IŽll add that to the external page.
>>>>
>>>>But I would refuse the introducing as new optional task. For supporting
>>>>scripting languages inside buildscripts, the <script*> family is the

>>>>right
>>>>choice. But if you could modify your code that another 
>>>>language="judoscript"
>>>>is supported, open a bug.
>>>>
>>>>I never tried JudoScript - maybe youŽll should try a  <script 
>>>>language="judoscript">
>>>>      your code
>>>>  </script>
>>>>before working ...
>>>>Maybe Peter, our great script-expert, knows more ;-)
>>>>
>>>>
>>>Judoscript is already supported by the Languages.properties file in  
>>>bsf.jar so the following
>>>works in ant:
>>>
>>>  <script language="judoscript">
>>>      println "Hello world";
>>>  </script>
>>>
>>>
>>>Peter
>>>
>>>>
>>>>Jan
>>>>
>>>>
>>>>>-----Ursprüngliche Nachricht-----
>>>>>Von: James Huang [mailto:judoscript@hotmail.com]
>>>>>Gesendet am: Freitag, 6. August 2004 08:26
>>>>>An: user@ant.apache.org
>>>>>Betreff: [Ann] Ant task for the JudoScript language
>>>>>
>>>>>Hi, Ant users and development team,
>>>>>
>>>>>
>>>>>I have created a <judoscript> task and am hereby submitting it to
be 
>>>>>added to the Ant task list per the instructions on the Ant web site. 
>>>>>The following is the information to be added to the external.xml found

>>>>>on Ant's web site:
>>>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>



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


Mime
View raw message