Ok - Got past the error, the issue seems to be the null package where Java.g was present.
Placing the Java.g in src/main/antlr3/com/antlr/generated (or a similar non-default . named package ) helped get past the error. ________________________________ From: Vijay Raj <[email protected]> To: Jim Idle <[email protected]>; [email protected] Sent: Mon, February 21, 2011 7:35:57 AM Subject: Re: [antlr-interest] Maven antlr integration ? Thanks, Jim for the pointers. I cleaned my maven cache. Here are the errors on the console: [INFO] --- antlr3-maven-plugin:3.3:antlr (default) @ core --- [INFO] ANTLR: Processing source directory ../core/src/main/antlr3 ANTLR Parser Generator Version 3.3 Nov 30, 2010 12:46:29 error(7): cannot find or open file: null/Java.g [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [ERROR] Failed to execute goal org.antlr:antlr3-maven-plugin:3.3:antlr (default) on project core: ANTLR caught 1 build errors. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Java.g is indeed present as per the directory structure recommended in the wiki. ../core$ ls src/main/antlr3/Java.g src/main/antlr3/Java.g The plugin fragment appears as below: (using v 3.3 , the latest ). <plugin> <groupId>org.antlr</groupId> <artifactId>antlr3-maven-plugin</artifactId> <version>3.3</version> <executions> <execution> <goals> <goal>antlr</goal> </goals> </execution> </executions> </plugin> What else could I be missing ? ________________________________ From: Jim Idle <[email protected]> To: Vijay Raj <[email protected]>; [email protected] Sent: Sun, February 20, 2011 9:56:44 PM Subject: RE: [antlr-interest] Maven antlr integration ? I don't think that you are using the correct version of the documentation and 3.1.3-1 is the wrong version of the maven plugin anyway. Why not create your project using the archetype 3.2 and then just overlay your own .g file. See: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+Mave n Use version 3.2 as in the article as 3.3 seems not to work and I have not had time to look at why just yet. And also see the docs for the plugin at: http://www.antlr.org/antlr3-maven-plugin/index.html I think you are following docs for the ANTLR 2 plugin or something. Jim > -----Original Message----- > From: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of Vijay Raj > Sent: Saturday, February 19, 2011 7:53 PM > To: [email protected] > Subject: [antlr-interest] Maven antlr integration ? > > For a particular task regarding parsing java 6 grammars - my maven > configuration of using antlr looks like this: > > > <plugin> > <groupId>org.antlr</groupId> > <artifactId>antlr3-maven-plugin</artifactId> > <version>3.1.3-1</version> > <configuration> > <goals> > <goal>antlr</goal> > </goals> > <conversionTimeout>10000</conversionTimeout> > <grammars>java.g</grammars> > </configuration> > > > I am getting the following error message: > > Failed to execute goal > org.apache.maven.plugins:maven-antlr-plugin:2.0-beta-1:generate > (default-cli) on > project root: The parameters 'grammars' for goal > org.apache.maven.plugins:maven-antlr-plugin:2.0-beta-1:generate are > missing or > invalid -> [Help 1] > > The documentation under reference: > http://www.antlr.org/wiki/display/ANTLR3/Using+ANTLR+3+with+Maven+2 . > Is that up > to date with the reality ? > > I am using the Java 6 grammar as in the grammars page, thanks to Yang > Jiang , > here at : http://openjdk.java.net/projects/compiler- > grammar/antlrworks/Java.g > . > > $ mvn --version > Apache Maven 3.0.2 (r1056850; 2011-01-09 06:28:10+0530) > > > Let me know what I could be missing here ! > > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- > email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
