Script configuration
To modify the parameters used for compiling, debugging, and running scripts, edit the script configuration.
- properties
-
Any custom properties.
- ECMAScript
-
JavaScript debug and compile options. JavaScript is an ECMAScript language.
-
javascript.optimization.level
- The current optimization level. Expected integer range is from -1 to 9. For more information about optimization level, refer to Rhino Optimization.The default value is
9
. -
javascript.recompile.minimumInterval
- The minimum time between script recompile.The default value is
60000
, or 60 seconds. This means that any changes made to scripts will not get picked up for up to 60 seconds. If you are developing scripts, reduce this parameter to around100
(100 milliseconds).If you set the
javascript.recompile.minimumInterval
to-1
, or remove this property from the script configuration, IDM does not poll JavaScript files to check for changes.
-
- Groovy
-
Compilation and debugging options related to Groovy scripts. Many of these options are commented out in the default script configuration file. Remove the comments to set these properties:
-
groovy.warnings
- The Groovy script log level. Possible values arenone
,likely
,possible
, andparanoia
. -
groovy.source.encoding
- The Groovy script encoding format. Possible values areUTF-8
andUS-ASCII
. -
groovy.target.directory
- The compiled Groovy class output directory. The default directory isinstall-dir/classes
. -
groovy.target.bytecode
- The Groovy script bytecode version. The default version is1.5
. -
groovy.classpath
- The directory where the compiler should look for compiled classes. The default classpath isinstall-dir/lib
.To call an external library from a Groovy script, you must specify the complete path to the .jar file or files, as a value of this property. For example:
"groovy.classpath" : "/&{idm.install.dir}/lib/http-builder-0.7.1.jar: /&{idm.install.dir}/lib/json-lib-2.3-jdk15.jar: /&{idm.install.dir}/lib/xml-resolver-1.2.jar: /&{idm.install.dir}/lib/commons-collections-3.2.1.jar",
If you’re deploying on Microsoft Windows, use a semicolon ( ;
) instead of a colon to separate directories in thegroovy.classpath
. -
groovy.output.verbose
- Verbosity of stack traces. Boolean,true
orfalse
. -
groovy.output.debug
- Whether to output debug messages. Boolean, `true ` orfalse
. -
groovy.errors.tolerance
- The number of non-fatal errors that can occur before a compilation is aborted. The default is10
errors. -
groovy.script.extension
- Groovy script file extension. The default is.groovy
. -
groovy.script.base
- Groovy script base class. By default, any class extendsgroovy.lang.Script
. -
groovy.recompile
- Whether scripts can be recompiled. Boolean,true
orfalse
, with defaulttrue
. -
groovy.recompile.minimumInterval
- Groovy script minimum recompile interval.The default value is
60000
, or 60 seconds. Using the default value, any changes made to scripts may not be in effect for up to 60 seconds. If you are developing scripts, reduce this parameter to100
(100 milliseconds). -
groovy.target.indy
- Whether to use a Groovy indy test. Boolean,true
orfalse
, with defaulttrue
. -
groovy.disabled.global.ast.transformations
- A list of disabled Abstract Syntax Transformations (ASTs).
-
- sources
-
The directories where IDM looks for referenced scripts.
Excerpt of a script configuration displaying default directories:
"sources" : { "default" : { "directory" : "&{idm.install.dir}/bin/defaults/script" }, "install" : { "directory" : "&{idm.install.dir}" }, "project" : { "directory" : "&{idm.instance.dir}" }, "project-script" : { "directory" : "&{idm.instance.dir}/script" }
IDM loads scripts from
sources
in reverse order (bottom to top).
By default, debug information (for example, file name and line number) is excluded from JavaScript and Groovy exceptions. To troubleshoot script exceptions, you can include debug information by changing the following settings to
Including debug information in a production environment is not recommended. |