Like so…

Put the following in your pom:

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>javacc-maven-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>jjtree-javacc</id>
                        <goals>
                            <goal>jjtree-javacc</goal>
                        </goals>
                        <configuration>
                            <!-- options for JJTree and JavaCC go here -->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
       </plugins>
   </build>

And your “.jjt” files go into “src/main/jjtree.

You can see an example in the “river-container-core” module at 
https://github.com/trasukg/river-container

Cheers,

Greg Trasuk.
Open-Source Stream Lead, Web Age Solutions 
http://www.webagesolutions.com/courses/open-source-training

On Mar 3, 2014, at 1:46 AM, Umashanker, Srividhya <[email protected]> 
wrote:

> I want to compile .jjt files into .java files using maven with javacc/jjtree.
> 
> The maven-antrun-plugin wiki 
> http://maven.apache.org/plugins/maven-antrun-plugin/usage.html says  :
> 
> 
> 
> Some Ant expressions have their respective counterparts in Maven. Thus, one 
> can simply invoke the corresponding Maven expression instead of using 
> maven-antrun-plugin to avoid the unneccessary overhead.
> 
> Ant expression
> 
> Plugin
> 
> JavaCC
> 
> maven-compiler-plugin<http://maven.apache.org/plugins/maven-compiler-plugin/>
> 
> JJDoc
> 
> maven-compiler-plugin<http://maven.apache.org/plugins/maven-compiler-plugin/>
> 
> JJTree
> 
> maven-compiler-plugin<http://maven.apache.org/plugins/maven-compiler-plugin/>
> 
> 
> 
> Can someone point me to an example on how to use JJtree with 
> maven-compiler-plugin?  Could not find much details on how to use other 
> compilers.
> 
> -Vidhya


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to