Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Labels:
      None
    • Environment:
      mac os
      europa
      javacc-maven-plugin v2.4

      Description

      mvn eclipse:eclipse result is inconsistent, due to deprecated avacc-maven-plugin usage.
      should use piped "jjtree-javacc" goal.
      core :
      <execution>
      <id>fulltext-jjtree</id>
      <configuration>
      <sourceDirectory>$

      {basedir}/src/main/javacc/fulltext</sourceDirectory>
      <outputDirectory>${project.build.directory}/generated-src/main/java</outputDirectory>
      <timestampDirectory>${project.build.directory}/generated-src/javacc-timestamp</timestampDirectory>
      <packageName>org.apache.jackrabbit.core.query.lucene.fulltext</packageName>
      </configuration>
      <goals>
      <goal>jjtree-javacc</goal>
      </goals>
      </execution>

      spi-commons:
      <execution>
      <id>sql-jjtree-javacc</id>
      <configuration>
      <sourceDirectory>${basedir}

      /src/main/javacc/sql</sourceDirectory>
      <outputDirectory>$

      {project.build.directory}/generated-src/main/java</outputDirectory>
      <timestampDirectory>${project.build.directory}

      /generated-src/javacc-timestamp</timestampDirectory>
      <packageName>org.apache.jackrabbit.spi.commons.query.sql</packageName>
      </configuration>
      <goals>
      <goal>jjtree-javacc</goal>
      </goals>
      </execution>
      <execution>
      <id>xpath-jjtree-javacc</id>
      <configuration>
      <sourceDirectory>$

      {basedir}

      /src/main/javacc/xpath</sourceDirectory>
      <outputDirectory>$

      {project.build.directory}/generated-src/main/java</outputDirectory>
      <timestampDirectory>${project.build.directory}

      /generated-src/javacc-timestamp</timestampDirectory>
      <packageName>org.apache.jackrabbit.spi.commons.query.xpath</packageName>
      </configuration>
      <goals>
      <goal>jjtree-javacc</goal>
      </goals>
      </execution>

        Activity

        Hide
        Jukka Zitting added a comment -

        Perfect! I've been waiting for this for a long while. I'll get this committed in a moment...

        Show
        Jukka Zitting added a comment - Perfect! I've been waiting for this for a long while. I'll get this committed in a moment...
        Hide
        Jukka Zitting added a comment -

        Committed in revision 631908. Thanks, this makes many people happy!

        Show
        Jukka Zitting added a comment - Committed in revision 631908. Thanks, this makes many people happy!
        Hide
        Benjamin Bentmann added a comment -

        You could further simplify your config for the javacc-maven-plugin by merging the executions. The plugin is capable of determing the package name from the parser file, so the parameter packageName is not needed (and is actually not even evaluated by the jjtree-javacc goal). The parameter sourceDirectory could in both cases be extended to src/main/javacc:

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>javacc-maven-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <sourceDirectory>src/main/javacc</sourceDirectory>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>jjtree-javacc</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        

        In principle, this config should allow you to drop in new grammers without the need to touch the plugin config in the POM. Also, having the <configuration> outside of the <executions> enables you to invoke the plugin directly on the command line, i.e. "mvn javacc:jjtree-javacc".

        Show
        Benjamin Bentmann added a comment - You could further simplify your config for the javacc-maven-plugin by merging the executions. The plugin is capable of determing the package name from the parser file, so the parameter packageName is not needed (and is actually not even evaluated by the jjtree-javacc goal). The parameter sourceDirectory could in both cases be extended to src/main/javacc : <plugin> <groupId> org.codehaus.mojo </groupId> <artifactId> javacc-maven-plugin </artifactId> <version> 2.4 </version> <configuration> <sourceDirectory> src/main/javacc </sourceDirectory> </configuration> <executions> <execution> <goals> <goal> jjtree-javacc </goal> </goals> </execution> </executions> </plugin> In principle, this config should allow you to drop in new grammers without the need to touch the plugin config in the POM. Also, having the <configuration> outside of the <executions> enables you to invoke the plugin directly on the command line, i.e. "mvn javacc:jjtree-javacc".

          People

          • Assignee:
            Jukka Zitting
            Reporter:
            Stephane Landelle
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development