Without fail if I post a question some where I always find the solution right after. Hopefully this will help someone else who might run into this.
Apparently this code is old and for some reason the @StaticMetaModel classes were generated manually and included as part of the project in the src folder path. Maybe this was a bug with java 6 that made it not recognize the sources under ../generated-code/annotations
. I had simply to remove the copy in our src folder path and everything works fine.
Maybe someone else with more experience can comment and describe exactly how the annotation processor works in JPA/hibernate, but basically it seems to be checking for classes with @Entity and then creates .java versions of them with the @StaticMetaModel annotation and then puts them in the ../generated-code/annotations
folder. If I try to run compile in Intellij it will fail at first, but if I run the compile stage in maven and then I compile in Intellij everything is fine as expected.