ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional Script.java
Date Wed, 29 May 2002 00:46:16 GMT
If anyone has any objections to this making it to Ant 1.5 it won't hurt my
feelings and I'll remove it.  But without this, BeanShell won't work from
within Ant.

Are there any reasons not to use the static {} block?

    Erik - finally getting around to cleaning up some Ant 1.5 chores for
Beta2


----- Original Message -----
From: <ehatcher@apache.org>
To: <jakarta-ant-cvs@apache.org>
Sent: Tuesday, May 28, 2002 8:42 PM
Subject: cvs commit:
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional Script.java


> ehatcher    02/05/28 17:42:42
>
>   Modified:    src/main/org/apache/tools/ant/taskdefs/optional Tag:
>                         ANT_15_BRANCH Script.java
>   Log:
>   add support for BeanShell, something we have to do because there is no
dynamic registration of languages in BSF yet.
>
>   Revision  Changes    Path
>   No                   revision
>
>
>   No                   revision
>
>
>   1.14.2.1  +8 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
>
>   Index: Script.java
>   ===================================================================
>   RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script
.java,v
>   retrieving revision 1.14
>   retrieving revision 1.14.2.1
>   diff -u -r1.14 -r1.14.2.1
>   --- Script.java 14 Apr 2002 11:16:16 -0000 1.14
>   +++ Script.java 29 May 2002 00:42:42 -0000 1.14.2.1
>   @@ -73,7 +73,14 @@
>        private String language;
>        private String script = "";
>        private Hashtable beans = new Hashtable();
>   -
>   +
>   +    // Register BeanShell ourselves, since BSF does not
>   +    // natively support it (yet).
>   +    static {
>   +        BSFManager.registerScriptingEngine( "beanshell",
>   +            "bsh.util.BeanShellBSFEngine", new String [] { "bsh" } );
>   +    }
>   +
>        /**
>         * Add a list of named objects to the list to be exported to the
script
>         */
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message