proposed package structure

As a lot of Axon related classes (command, events, repositories, etc.) are present in almost all projects, I was wondering whether some kind of proposed package structure for these classes has emerged.
I know DDD encourages packages to be organisational (business orientied) instead of technically oriented (separate packages for commands, repositories, etc). Are you applying this concept and does that result in all above-mentioned classes to be in the same package?

Hi Dennis,

functional grouping of classes is generally a good idea. I tend to split my domain components into roughly two groups.
The first is the core api. This is basically the collections of commands and events. If you have a large system, your can split the commands and events into separate components. These components should also make sense businesswise.
The other one is the domain implementation. Since external applications should only use commands and events of the api, the domain classes do not need to be exposed. Value objects used in commands and/or events are an exception to this rule.

In some cases, both ‘groups’ are in the same package. The impl classes are just made package private (default visibility) to prevent accidental use in other modules. In larger applications and distributed apps, I prefer to put the api classes in another module, that can be shared with other nodes.

Hope this helps.