[
https://issues.apache.org/jira/browse/JCR-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601063#action_12601063
]
Benjamin Bentmann commented on JCR-1430:
----------------------------------------
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}}:
{code:xml}
<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>
{code}
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".
> mvn eclipse:eclipse inconsistent
> --------------------------------
>
> Key: JCR-1430
> URL: https://issues.apache.org/jira/browse/JCR-1430
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core, jackrabbit-spi-commons
> Environment: mac os
> europa
> javacc-maven-plugin v2.4
> Reporter: Stephane Landelle
> Assignee: Jukka Zitting
> Priority: Minor
> Fix For: 1.5
>
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> 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>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.