Hi right now master sets polyglot.js.allowAllAccess to true when it detects the script engine is a GraalVM engine. This is necessary if the script wants to use any of the Ant objects.
Jaikiran suggests to enable full Nashorn compatibility mode, which I tend to agree with. Unfortunately you cannot do that via the ScriptEngine API, only via a system property or by creating the GraalJSScriptEngine directly - see https://github.com/graalvm/graaljs/blob/master/docs/user/ScriptEngine.md I see the following options: (1) leave things as they are right now and tell people to set system properties before starting Ant if they need more. (2) Set the "Nashorn compatibility mode" via the system property based on another magic property - and enable it by default (3) add graaljs as an alternative javax as script engine and add new magic properties to control it. (4) find all the places that might create script engines (script and scriptdef tasks as well as the script filter, at least) and add explicit options. Personally I'd prefer one of the first two options and would like option 3 the least. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org