Hi there,

There's a a bug in the Antlr4Mojo class where the grammar files are
stored in the src/main/antlr3 root (for example
src/main/antlr3/MyGrammar.g). Despite scanning and finding the grammar
file (and reporting its location nicely), it results in a 'null' value
being passed back from findSourceSubdir(File,String) such that the
following error occurs:

error(7):  cannot find or open file: null/MyGrammar.g

and results in the following exception trace:

Caused by: org.apache.maven.plugin.MojoExecutionException: ANTLR
caught 2 build errors.
       at org.antlr.mojo.antlr3.Antlr3Mojo.execute(Antlr3Mojo.java:397)
       at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
       at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
       ... 16 more

I had formerly been using the codehaus 1.0 release and been setting
the output directory to

target/generated-sources/antlr/my/full/package/path/ so that the

generated files arrived in the right place. Happily the new plugin
does this for you so simply moving the grammar to

src/main/antlr3/my/full/package/path/MyGrammar.g

solved the problem and meant I didn't have to specify the output
directory either \:D/

Hope this helps any other people perplexed by the issue and that it
might result in a fix (not that I'm dependent on it any longer;)?

Best wishes,

Michael

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.


Reply via email to