Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 14008 invoked from network); 17 May 2002 17:49:08 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 May 2002 17:49:08 -0000 Received: (qmail 21435 invoked by uid 97); 17 May 2002 17:48:59 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 21387 invoked by uid 97); 17 May 2002 17:48:58 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 21375 invoked by uid 98); 17 May 2002 17:48:58 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <4A19F19A1BB4D51183220020ED06971401030223@exch2.iso-ne.com> From: "Doyle, Jim" To: Erik Hatcher , Ant Users List Subject: RE: Script and BeanShell Date: Fri, 17 May 2002 13:55:14 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N That'd be great. As Conor mentions below, there's a problem with specifying extra languages for BSF, as I found when I tried it a few different ways. BSF has a properties file in its jar file that declares the languages it recognizes. Really it's just a simple language-name-to-class-name mapping. Currently, it doesn't include BeanShell, though some future BSF version is supposed to include it. The only other way to register a language is programmatically declaring that specific language before your code executes the script. Currently I'm using a hacked version of the BSF jar with BeanShell added to the properties file. But I think Script task support like this would be appropriate: If the optional "languageclass" attribute is present, you would invoke BSF code like: BSFManager mgr; ... String[] extensions = {"bsh"}; mgr.registerScriptingEngine ("beanshell", "bsh.util.BeanShellBSFEngine", extensions); The best source of info about this I've seen is the BSF guide (bsf-2_2/docs/guide/guide.pdf) included in the BSF binary distribution: http://www-124.ibm.com/developerworks/project/showfiles.php?group_id=16&rele ase_id=59 Thanks, Jim > -----Original Message----- > From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com] > Sent: Friday, May 17, 2002 10:38 > To: Ant Users List > Subject: Re: Script and BeanShell > > > If someone could point me to the right info I'll have a whack > at fixing this > at some point in the near future. > > Erik > > > ----- Original Message ----- > From: "Conor MacNeill" > To: "Ant Users List" > Sent: Friday, May 17, 2002 12:01 AM > Subject: Re: Script and BeanShell > > > > I think there is an issue. I had a discussion with Pat a > while ago and > > you need to explicitly register BeanShell in the script > task. This will > > need a change to the script task. Perhaps we need a nested > element to > > allow you to register an aribtrary scripting language. > > > > Conor > > > > > > Erik Hatcher wrote: > > > You should simply be able to say: > > > > > > > > > > > > I believe. Whatever language name is associate with > BeanShell scripts > with > > > BSF is the one to use. I don't know if you need to have a > newer version > of > > > BSF or not, but looks like you need the BeanShell/BSF adapter: > > > http://www.beanshell.org/download.html - probably if you > toss them all > in > > > ANT_HOME/lib it'll work! > > > > > > Erik > > > > > > > > > ----- Original Message ----- > > > From: "Doyle, Jim" > > > To: > > > Sent: Thursday, May 16, 2002 3:42 PM > > > Subject: Re: Script and BeanShell > > > > > > > > > > > >>Hi, > > >> > > >>I'm interested in using the script task to run beanshell as well. > > >>It looks like BSF support was added to beanshell around > version 1.2b1. > > >>Once a language supports BSF, how can one integrate it into the > > >>Script task? > > >> > > >>Jim > > >>jdoyle@iso-ne.com > > >> > > >> > > >> > > >>-- > > >>To unsubscribe, e-mail: > > > >>For additional commands, e-mail: > > > >> > > >> > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > > For additional commands, e-mail: > > > > > > > -- To unsubscribe, e-mail: For additional commands, e-mail: