[hibernate-dev] ORM - location of generated sources

Gunnar Morling gunnar at hibernate.org
Mon Jul 20 02:50:20 EDT 2015


Hi,

The build for hibernate-core generates sources using Antlr which end up in
target/generated-src/antlr/main, e.g. GeneratedOrderByFragmentParser.java.

The weird thing is that the generated files are located right within this
directory, i.e.  there is *no* directory hierarchy resembling the package
structure. The files have package declarations such as
"org.hibernate.sql.ordering.antlr", though.

Apparently, this works in the Gradle build (no errors due to that), but in
my IDE I am getting tons of compile errors due to the mismatch of package
declaration and file location. Interestingly, the files also end up in the
right place in the hibernate-core.jar, so I assume that there is some Magic
in place at the Gradle level which deals with that stuff.

Does anyone know how to make it work in the IDE as well?

Thanks,

--Gunnar


More information about the hibernate-dev mailing list