[
http://jira.codehaus.org/browse/MGROOVY-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100049
]
Jason Dillon commented on MGROOVY-47:
-------------------------------------
The environment for running scripts from the CLI and from Maven are different.
For example, when running from Maven, there is a 'project' variable bound in
the default context, which does not exist on the CLI.
There isn't really anything to pass in as 'args', since there is no way to get
what was passed to the Maven main() when the JVM was launched.
> execute goal ignores args implicit variable
> -------------------------------------------
>
> Key: MGROOVY-47
> URL: http://jira.codehaus.org/browse/MGROOVY-47
> Project: Maven 2.x Groovy Plugin
> Issue Type: Bug
> Components: execute
> Environment: Version 1.0-alpha-2 (the last one in codehaus repo)
> Reporter: bengalister
> Assignee: Jason Dillon
>
> I get the following error when executing the execute goal:
> " No such property: args for class: test"
> To reproduce the issue:
> 1) Create a test.groovy script in src/main/groovy with the following code:
> args.each() {
> println it
> }
> println args.length
> 2) Run the execute goal:
> mvn groovy:execute
> When executing it directly with groovy or after compiling it with groovyc,
> it runs without any error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email