Home > Blockchain >  Use source files generated by ANTLR
Use source files generated by ANTLR

Time:03-13

I use ANTLR with the maven plugin to generate the source files. When creating them with mvn package they get correctly compiled and put together into target/generated-sources/antlr4, but from there I cannot access them in from my project.

My question is if I should be able to do this and import them somehow or if I need to move them from there to src.

CodePudding user response:

I found the answer: My pom.xml was missing <phase>generate-sources</phase> which was not mentioned in the Baeldung article I was following. After adding this to the execution tag it all worked and I could use it in my project!

  • Related