Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-819

Maven pom.xml which uses JavaCC to generate Parser files for Velocity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Engine
    • None

    Description

      This patch is meant for the new Velocity 2.0 Maven based build. Currently the problem is that it is difficult to generate new Parser source files if the Parser.jjt files is changed. This patch automates the whole process.

      The patch adds support for two command line arguments:

      To generate new Parser source files after you have changed the main/parser/Parser.jjt, use command line switch:
      mvn -Dparser.create=true package

      To generate new AST Node source files after you have done major changes to the parser (new nodes/directives), use command line switch:
      mvn -Dparser.create=true -Dparser.nodefiles=true package

      The Maven build will give instructions how to handle the generated AST Node files.

      This patch also removes many generated files from version control. It is not necessary to store them in SVN as the Maven build can now automatically generate them when needed. If the parser source has not changed, the parser generation step is skipped.

      As a bonus, I added support for switch -Dmaven.test.skip=false. In current pom.xml revision it was hardcoded that tests are always skipped.

      Attachments

        1. velocity-mvn-generated-parser.patch
          314 kB
          Jarkko Viinamäki

        Activity

          People

            cbrisson Claude Brisson
            wyla Jarkko Viinamäki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: