After all these years I once again modified an open source project to do something I needed, and this time it was Maven's EAR Plug-in.
On release of version 2.3.2, you will be able to do following:
- Generate XML-files for JBoss 5.0
- Specify an alternate 3rd-party library directory
- Specify both the loader-repository and loader-repository-config sections
- Set an alternative configParserClass and loaderRepositoryClass
... which would create a jboss-app.xml with the corresponding configuration.
Anyway, if you can't wait for the release of version 2.3.2, just fetch the source code and compile it.