I have multiple .ear projects which use multiple libraries. So I need to make those as common and add those in the module. So Is there any easy way to create module.xml as I nee
No need to create 'module.xml' for each library.
Create a single module and put all libraries there and mention it in resource-root. Also mention any module dependencies (if no, ignore it).
Example module.xml
Copy your modules to '$JBOSS/modules' directory which makes it as global module.
Refer: How can I use the external jars on JBoss 7?