[antlr-interest] Maven vs AntlrWorks Generated Sources

Jim Idle jimi at temporal-wave.com
Wed Sep 30 07:56:45 PDT 2009


On 09/30/2009 02:46 AM, Luca Li Greci wrote:
>
>
> 2009/9/29 Jim Idle <jimi at temporal-wave.com 
> <mailto:jimi at temporal-wave.com>>
>
>     On 09/29/2009 12:35 PM, Luca Li Greci wrote:
>>
>>     <plugin>
>>
...
>
>
>     Hi - you should avoid setting up your own structure under source
>     and use the pre-known locations of the .g files. Read the docs at
>     www.antlr.org/antlr3-maven-plugin
>     <http://www.antlr.org/antlr3-maven-plugin>. The .g files should go
>     under the antlr directory and they should be in sub directories of
>     this directory that reflect the package structure you want for the
>     generated files. Include and lib, as well as import is then
>     calculated automatically.
>
>     Also note that we are at ANTLR 3.2 and plugin 3.2 now, though I
>     think that Maven central is not syncing our repository right now
>     and I have no time to try and work out why.
>
>     Jim
>
>
>
> Hi Jim,
>
> Let me see if my understanding is correct.
>
> You said that when the grammar is under src/main/antlr3* *the maven 
> plugin automatically picks up all grammar defined under any 
> subdirectories (such as org/mycompany/myproduct) so that the maven 
> parameters include, lib, and the @parser::header {package 
> org.mycompany.myproduct;} are useless. Is it my understanding correct ?
Not useless, but redundant. The plugin assumes that if it is in 
src/main/antlr3/org/x/y  then it has a package set to that and will 
produce the java code in the same pacakge structure. Lib is then 
redundant as the tokens files are taken care of.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090930/5ac43ce1/attachment.html 


More information about the antlr-interest mailing list