When code is generated you can download it and then use Apache Maven to build the software and run tests via single Maven command (mvn install).
You can save a significant amount of time and effort by creating MongoDB data models in M2 and then generate Java code via just a single click. The quality of your code will also be improved. It will be unit tested and all this will be done for you by M2 in a fully automated fashion.
This kind of service can also be very useful for a quick creation of disposable schemas (data models) in an agile environment when you want to quickly create schemas, generate Java persistence code from it, immediately test it, and repeat this procedure starting over with the current schema update or a completely new schema creation.
As soon as you become familiar with data models creation in M2, which is very intuitive, the speed of the software creation and build from it will be instantaneous.
All your models are fully managed in M2 where you can also store your models’ documentation in M2 repository or you can provide links for external documentations.
Daprota has documented its MongoDB Data Modeling Advisor which you can access to find out more about MongoDB schema design (data modeling) patterns and best practices.
M2 is a free service including the Java code generator.