Hi
I am struggling to get the antlrv2 maven plugin to find the vocabulary of a
grammar.
If I put the grammar in src/main/antlr it finds the grammar ok but the
importVocab command fails.
If I put the vocabulary in the base directory of the maven project, it will
find the vocabulary.
However, if I build the project as part of a modular maven project (i.e it is a
sub module of another module) it cannot find the vocabulary.
I have fiddled with sourceDirectory and the grammar localtion in the plugin.
For example below I have tried to make the sourceDirectory the basedir of the
submodule.
plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>antlr-maven-plugin</artifactId>
<configuration>
<sourceDirectory>${basedir}</sourceDirectory>
<grammars>src/main/antlr/MySqlParser.g</grammars>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
Anyone else found a way around this problem? I guess changing maven2's working
directory to that of the grammar would work but it is not clear to me how to do
this.
James