When generating my application from a ROO script, the generator duplicates the last package for almost all the entities. This is rather painful to correct after generation. I found 2 conditions for this bug to be triggered:
- using an abstract class, in a package different that the main one
- not putting any commands between "jpa setup" and "entity jpa"
Here is an easy way to reproduce this bug:
- open the sample multimodule.roo
- change line "entity jpa --class ~.domain.AbstractPerson --abstract" to "entity jpa --class ~.domain.base.AbstractPerson --abstract" to relocate the entity in domain.base
- remove the 2 enum types or comment their declaration. The script will fail for this later on but the bug will be triggered before
- run the script
- notice that the the Entities Owner and Vet are now in the package "domain.domain" rather than just "domain"
I believe this is just a missing re-initialization in the core, but I can't help any further. I joined the demo script to the ticket.