Author: olamy Date: Mon Nov 14 20:48:06 2011 New Revision: 1201891 URL: http://svn.apache.org/viewvc?rev=1201891&view=rev Log: more documentation
Modified: maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm Modified: maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm?rev=1201891&r1=1201890&r2=1201891&view=diff ============================================================================== --- maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm (original) +++ maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm Mon Nov 14 20:48:06 2011 @@ -80,6 +80,27 @@ Overview new FileLogger( logFile ), "foo", true ); +--------- +** Global variables + + Your scripts will have by default two global variables: + + * basedir: the base directory of your script + + * context: the build context (see below) + + [] + + You can add more global variables as it. + ++--------- + + SystemStreamLog systemStreamLog = new SystemStreamLog(); + + ScriptRunner scriptRunner = new ScriptRunner( systemStreamLog ); + scriptRunner.setGlobalVariable( name, value ); + ++--------- + ** Build context You can pass some values to your script using a execution context which have the type <<<Map<String, ? extends Object> context>>>.