I would advise you against trying to combine those into a single module.
There are a few issues in trying to combine them into a single module. The major issue is that it reduces flexibility. If you have a 'Java App Stack' module that includes those items, and a 'AMQ stack' module that also includes java, you create a conflict when one day you decide that you want to have 'AMQ' installed on your 'Java App Stack.'
The normal approach would be to create a wrapper module that includes Java, Tomcat, and MySQL. Since includes do not create conflicts, you could easily create another wrapper module for a different app stack, and both would work together. The wrapper pattern is common in Puppet sites; we call them profiles. https://puppetlabs.com/presentations/...
This approach also makes debugging way easier. If you have a problem with one component of the stack, you need only look at that one module. Reducing your scope makes your intent clearer, makes documenting and testing your modules simpler, and reduces the complexity of your interfaces.