'Groovy Console with defaulted imports

Is there a way to start the groovy console with a set of imports already set or variables predefined?

java -cp <some jar with groovy> org.codehaus.groovy.tools.shell.Main

But before the user even does anything several things have been already imported for them, such as static functions or classes.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source