ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Seeger" <rsee...@nortelnetworks.com>
Subject Javascript errors
Date Tue, 25 Sep 2001 17:38:48 GMT
I'm having a problem with the script task, and I was hoping someone might
be able to point me in the right direction. Since I can't seem to find a
good reference on how to use javascript with ant, I've been pulling pieces
from here and there, with little success.

I downloaded bsf.jar and js.jar and put them in $ANT_HOME/lib. I tried to
find rhino.jar, but js.jar was the best I could come up with (*looks
confused*)

I then tried a variety of scripting pieces, and came up with the following:

<target name="testme" id="testme">
  <property name="prefix" value="/bin/"/>
  <property name="suffix" value="/notbin/"/>
  <script language="javascript"> <![CDATA[
    function makePath(prefix, path, suffix) {
      var newPath = prefix + path + suffix;
      return makePath;
    }
    var prefix = testme.getProperty("prefix");
    var suffix = testme.getProperty("suffix");
    var path = makePath(prefix, "WUIadmin", suffix);
    path = path + ":" + makePath(prefix, "SLTools", suffix);
    testme.setProperty("pkg.classpath", path);
  ]]> </script>
  <echo message="${pkg.classpath}"/>
</target>

However, when I run it, I get the following error message:

d:\Java\TestPrograms\TestAnt\tree.slsrc.SLGEN3.java.com.nortelnetworks.servi
celink.datasource.build.xml:69: undefined: getProperty is not a function.
(<ANT>; line 5)

Can anyone either tell me what I'm doing wrong, or point me in the
direction of a source with good information about using javascript from
within Ant?

Thanks in advance,
Rob Seeger
========================================
Robert Seeger
Network Engineer
Nortel Networks

Telephone:	(518)237-2087
Pager:		(800)SKY-8888  Pin#1264792
Fax:		(518)237-4190
Email:		rseeger@nortelnetworks.com
Address:	224 5th Ave, Apt#2
		Lansingburgh, NY 12182
========================================

Mime
View raw message