Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The sources can be found here :
- Gram

Using Gram

You can use the Gram class as a main() and run it from your IDE if you wish. There is a GramTask as well for using it inside Ant.

Often since JAM depends on Sun's doclet stuff, you can have issues running the GramTask inside Maven and sometimes Ant. So I tend to run the Gram command line tool from inside an Ant build. e.g.

Code Block
    <java classname="org.codehaus.gram.Gram" fork="true">
      <classpath refid="tool.classpath"/>

            <!-- the directory where the source code lives -->
      <arg value="src/java"/>

      <!-- the groovy script to run to generate stuff -->
      <arg value="src/script/MyGram.groovy"/>


Wiki Markup

Jar Dependencies

Gram just depends on:

  • The Groovy 'all' jar (groovy-all-1.0-beta-*.jar)
  • JAM (there is a jam-dev.jar in the groovy jar repository
  • commons-logging (well what doesn't depend on that (smile)
  • from the Annogen project
  • and potentially: xml-apis.1.02b.jar and Sun's tools.jar


You might find some more documentation in the form of blog posts by Andres Almiray: