Metamodel sources are generated in the wrong place with AspectJ

Description

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:
https://github.com/pjreed/aspectj-metamodel-test

Environment

Ubuntu Linux 14.04 LTS
Java 1.7 and 1.8
Maven 3.0.5
Hibernate 5.x
No database necessary to demonstrate issue

Assignee

Unassigned

Reporter

P. J. Reed

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure