ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Beard <jbea...@cs.mcgill.ca>
Subject Rhino global.load() in script context
Date Sat, 21 Aug 2010 16:18:53 GMT
Hi,

My Ant script currently generates JavaScript modules, and I also have 
JavaScript modules for unit testing the generated JavaScript. What I'd 
like to do is use a Rhino script element to load the generated 
JavaScript and the unit test modules, and run one on the other. In order 
to do this, I thought I would use Rhino's global.load() function, 
passing in paths as needed, but it looks like load() is not available in 
the global object when running in the Ant script context. Alternatively, 
it seems it would be possible to use Rhino (loadfile task) or Java API's 
to read the contents of the files and then eval them, but unfortunately 
the unit test module has dependencies on other modules, and the module 
loader relies on the existence of load() when running under Rhino. I'm 
wondering, is it possible to gain access to load() in the Ant script 
context?

Thanks,

Jake

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


Mime
View raw message