I am wondering if there is a repository (e.g. maven repository) that has JBoss AS release that installer can download automatically, so do not need to bundle JBoss AS for distribution.
There is no special download or a repository for different versions, the download is complete and you can run different profiles.
If you need a special configuration to run your application you may strip it.
Another option is to download the complete JBoss for installation and provide a script that strip and configure JBoss during the installation procedure.
Is there any doc or script for config/minimizing JBoss for web profile? which files to remove? In my case, My web app uses JSF, hibernate only. I like it to be minimal for easy distribution. Thanks,
There is no script for minimizing.
You need to decide whether, or how much, effort you spend to do such.
From my perspective the only reason to do such is security or to avoid other use of an installation.
AS7 will not load and start unneeded subsystems so there is no drawback at runtime.
I've written a wiki page for that, but still incomplete.
Another starting point is my quickstart ejb-multi-server contains a CLI script which create a stripped web-profile (search for default-web profile), you may install the QS or just modify ans use the install-domain.cli script.
If you use standalone mode you might run the script in domain mode and copy the XML part with an editor.
To complete that you should remove all extesion definitions on top ot the XML which are not longer needed. For each removed extension you can remove the modules/* directory also.
But you should check whether the server starts after each remove as there might be dependencies between modules.
If you only allow to run one mode you might delete one of the domain/standalone directories and the scripts as well.