After spending a week synching up the current build-distr.xml with the installer and seperating the ejb3/java5 artifacts its clear that the current copying of module output into the dist is poorly factored.
What we need is a notion of categories of module artifacts that can be reused in an ant build, maven plugin, installer descriptor, testsuite server setup, etc. One notion would be to have categories of file patterns for the module artifacts that correlate with the standard distribution structure. The categories are things like client jars, docs, api docs, config examples, static server jars, hot deployable content, etc. There also needs to be a notion of dependency. Right now modules drop down to the specification of dependency at the jar level. Maven has a better notion of a component dependency that should better correlate to depending on jms, a web container, etc.
This is just a concept that needs to be considered in the restructuring of the builds in the context of the move to maven. Any attempt to address it in the current legacy build would just be a waste trying to create custom ant/jbossbuild code.