I'm using AspectJ to compile the code for a Maven project. When I add hibernate-jpamodelgen to my project and compile, it generates the metamodel and compiles it, but the generated sources are placed in the wrong location. I would expect them in target/generated-sources/ underneath the project directory, but instead they are in the top-level project directory.
The generated classes seem fine and the produced artifact works as expected, but it's rather ugly to have sources littering the top level directory, and other tools such as IDEs expect generated sources to be in the right location.
I'm not entirely sure whether this problem is in jpamodelgen or AspectJ, but I'm guessing jpamodelgen since it actually generates the source code and I have seen AspectJ successfully generate other files in the right places. I've tried a handful of different recent versions of Hibernate and the problem exists in all of them.
I've created a simple project that demonstrates the problem here:
Ubuntu Linux 14.04 LTS
Java 1.7 and 1.8
No database necessary to demonstrate issue