I had the same problem with ANTLR 4.7, ANTLR v4 Maven Plugin, ANTLR 4 IDE Eclipse Plugin and Eclipse Oxygen.
If you see the can't find or load grammar error message in the Eclipse problem view, it comes from the ANTLR 4 Eclipse IDE module. Therefore, if you followed the rules of the antlr4 maven documentation (for example, you put the grammar files / lexer in the src/main/antlr4 ), this is fine and your maven project should compile without errors. As far as I understand from your question, this is the case for you. To get rid of the eclipse plugin error message, I also needed to add the same directory as the source directory to my project (i.e. go to project settings/Java Build Path/(Source tab) and add, for example, a folder src/main/antlr4/.../(YourGrammar.g) to the source folders.
Update
I tried to compile the github repository, and your pom seemed to be fine, despite some missing dependencies. I also noticed that you are using org.antlr.v4.runtime.tree.gui.TreeViewer in an example that is not available with antlr 4.5.1, so you either use an earlier version of antlr (e.g. 4.5) or uncomment this code. I created a pull request for you so you can see my changes.
Another notice (while I was playing with your project) is that the antlr4ide plugin will generate LexBasic.g4 lexer every small change in each grammar file (depending on it), which seems annoying. I would recommend disabling the tool in the project settings ( ANTLR4/Tool ). In any case, you will compile the project through maven. That way, you can still use the basic antlr4ide functions (e.g. syntax highlighting, indexing) for the project, but it will not generate grammar for every small change.
source share