Automatic Using the Maven Archetype
To be completed.
Also see Using The easiest way to create a module is to Use the Module Maven Archetype. It will create the project skeleton and a pom.xml file with all the dependencies for OpenMRS apis and repositories.
Manual Step by Step Instructions
...