Mojo's JavaCC Maven Plugin
  1. Mojo's JavaCC Maven Plugin
  2. MJAVACC-87

Allow customized parser sources to reside in src/main/java

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: javacc, jjtree, jtb
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The plugin currently requires users to place custom source files next to the grammar file as explained in the FAQ. As Jason Dillon pointed out on the mail thread JavaCC Maven Plugin at Geronimo, this is odd and I agree. Why should custom Java sources for the parser not live next to all the other Java sources in src/main/java?

        Issue Links

          Activity

          Hide
          Paul Gier added a comment -

          I think MJAVACC-20 explains why it implemented that way initially. Although I agree that it should be changed so that you can keep java sources in the main java source tree instead of with the javacc files.

          Show
          Paul Gier added a comment - I think MJAVACC-20 explains why it implemented that way initially. Although I agree that it should be changed so that you can keep java sources in the main java source tree instead of with the javacc files.
          Hide
          Benjamin Bentmann added a comment -

          Done in r7754, snapshot deployed.

          Show
          Benjamin Bentmann added a comment - Done in r7754 , snapshot deployed.
          Hide
          Benjamin Bentmann added a comment -

          Just to be explicit: The deprecated goals jjtree and jtb have not been enhanced. Only jjtree-javacc and jtb-javacc support this feature.

          Show
          Benjamin Bentmann added a comment - Just to be explicit: The deprecated goals jjtree and jtb have not been enhanced. Only jjtree-javacc and jtb-javacc support this feature.
          Hide
          Benjamin Bentmann added a comment -

          For the record: There seems to be an issue with IDEA's Maven integration (IDEA-19177) that causes the interim output of JJTree/JTB to be registered as a compile source root although the JavaCC Plugin does not actually declare it as such. This causes duplicate class errors...

          Show
          Benjamin Bentmann added a comment - For the record: There seems to be an issue with IDEA's Maven integration ( IDEA-19177 ) that causes the interim output of JJTree/JTB to be registered as a compile source root although the JavaCC Plugin does not actually declare it as such. This causes duplicate class errors...
          Hide
          Jason Dillon added a comment -

          Finally verified that setting:

          <interimDirectory>${project.build.directory}/tmp/jjtree</interimDirectory>
          

          Does fix the problem. Which is good enough for my needs.

          Show
          Jason Dillon added a comment - Finally verified that setting: <interimDirectory>${project.build.directory}/tmp/jjtree</interimDirectory> Does fix the problem. Which is good enough for my needs.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Benjamin Bentmann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: