Velocity
  1. Velocity
  2. VELOCITY-819

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.x
    • Fix Version/s: 2.x
    • Component/s: Engine
    • Labels:
      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.

        Activity

        Hide
        Claude Brisson added a comment -

        patch applied

        Show
        Claude Brisson added a comment - patch applied

          People

          • Assignee:
            Claude Brisson
            Reporter:
            Jarkko Viinamäki
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development