How to properly manage projects with generated classes


(davidmichaelkarr) #1

So I had to look at a particular project on github: https://github.com/jprante/jdbc-driver-csv.git . I cloned it and checked out the project and added the gradle nature (first had to change the sonarqube plugin version from 2.2 to 2.5). I then noticed it had compile errors, for a missing “ExressionParser” class. Then I realized that this uses javacc, and that ExpressionParser is a generated class. I verified that building it from the command line works. So, I then edited the build path for the project, adding “build/classes/main” as an additional class folder. This fixed the compile errors.

This seems weird to me. Is there a more “correct” way to do this in Buildship? Is there something that could have been done in the application itself that would have made this a little smoother?