You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Umashanker, Srividhya" <sr...@hp.com> on 2014/03/03 07:46:05 UTC

JJTree with maven-compiler-plugin

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

Re: JJTree with maven-compiler-plugin

Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello,

there is a special plugin for this at codehaus, just Google javacc maven
plugin and follow the *first* link.

Regards
Mirko
-- 
Sent from my mobile
On Mar 4, 2014 5:36 AM, "Umashanker, Srividhya" <sr...@hp.com>
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
>

RE: JJTree with maven-compiler-plugin

Posted by "Umashanker, Srividhya" <sr...@hp.com>.
Thanks for responding back. 
I did try this plugin. Looks like this is no longer active. When I integrated the plugin with Javacc 5.0, it does not work as expected.
The jjtree has come up with new changes in the later versions or command line arguments, which are not available in the plugin. This causes the source code to be generated in a wrong folder.

So, we are unable to use the plugin. Is there anyone used this plugin with recent versions of javacc 5.0?

-Vidhya

-----Original Message-----
From: Greg Trasuk [mailto:trasukg@stratuscom.com] 
Sent: Tuesday, March 04, 2014 7:26 PM
To: Maven Users List
Subject: Re: JJTree with maven-compiler-plugin


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 <sr...@hp.com> 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-p
> lugin/>
> 
> JJDoc
> 
> maven-compiler-plugin<http://maven.apache.org/plugins/maven-compiler-p
> lugin/>
> 
> JJTree
> 
> maven-compiler-plugin<http://maven.apache.org/plugins/maven-compiler-p
> lugin/>
> 
> 
> 
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JJTree with maven-compiler-plugin

Posted by Greg Trasuk <tr...@stratuscom.com>.
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 <sr...@hp.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org