I am running into a problem trying to run the <script> task. Ant is not finding it. I have optional.jar, bsf.jar and js.jar in the Ant lib directory. I am using Ant 1.5.1. Any ideas what could be the problem? The error message is:
Could not create task or type of type: script Thanks. Naresh -----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 3:17 PM To: 'Ant Users List' Subject: RE: Deriving new properties based on existing properties The particular example given could have been achieve with <condition> and <equals>. Granted would have required two <condition>s since the latter can only set two properties at a time, but still... Capitalizing first work letters is another story of course. --DD -----Original Message----- From: Naresh Bhatia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 2:04 PM To: Ant Users List Subject: RE: Deriving new properties based on existing properties Thanks sascha. That will work for me! Naresh -----Original Message----- From: Sascha Freitag [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 2:26 AM To: Ant Users List Subject: RE: Deriving new properties based on existing properties So fare as I know you have to do this with a script or your own task. Use <script> and any of the supported script languages see http://jakarta.apache.org/bsf/ for further information. Here an javascript snipped: <project basedir="../" name="projectname"> . . . <script language="javascript"> <![CDATA[ var prj = projectname; var entityclasses = prj.getProperty("component.entityclasses"); // generate entities if ( (entityclasses != null) && (!entityclasses.equals("")) ) { generate = true; prj.setProperty("component.generate", "true"); prj.setProperty("component.generate.entity", "true"); } ]]></script> Sascha -----Original Message----- From: Naresh Bhatia [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 28. Januar 2003 23:46 To: [EMAIL PROTECTED] Subject: Deriving new properties based on existing properties Is there any way to derive new properties based on existing properties? For example, given a property with value="user", I want to derive another property with the first letter capitalized, i.e. "User". I would like to use this approach to derive different filenames based on a base name that is supplied as a parameter. Thanks Naresh --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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]
