Search code examples
groovymavengmaven-plugin

Where to get a full list of pre-defined variables in gmaven-plugin?


Where to get a complete list of variables available in Groovy scripts executed under gmaven-plugin in Maven? Besides that, maybe someone knows where to find Gmaven documentation?

I'm aware about project and settings. I assume there are some others..


Solution

  • The page http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code lists:

    Default Variables
    By default a few variables are bound into the scripts environment:
    
    project  The maven project, with auto-resolving properties
    pom  Alias for project
    session  The executing MavenSession
    settings     The executing Settings
    log  A SLF4J Logger instance
    ant  An AntBuilder instance for easy access to Ant tasks
    fail()   A helper to throw MojoExecutionException