I have a maven project with nothing related to groovy in pom.xml
. And I just want to execute a groovy script test.groovy
in the root of my project with access to all project's classes.
so I try to run an command:
mvn groovy:execute -Dsource=test.groovy
but it tells me that:
[ERROR] Failed to execute goal org.codehaus.mojo:groovy-maven-plugin:1.5:execute (default-cli) on project modules-journal:
The parameters 'source' for goal org.codehaus.mojo:groovy-maven-plugin:1.5:execute are missing or invalid -> [Help 1]
what is wrong?
mvn groovy:shell
works perfectly, but I want to run predefined script.