shrinkwrap/shrinkwrap — pull request #87 by robertpanzer (2014-04-21 17:23:01+00:00)
Title: Added support for TargetArchiveAwareAssets and automatically arranging d...

...efault Java EE descriptors
This new PR goes back to discussions with @aslakknutsen on PR #85

Instead of having methods like WebArchive.setBeansXml() as in the original PR this one proposes an API like

```ShrinkWrap.create(WebArchive.class).add(new DescriptiveAsset("beans.xml")) ```

to get a beans.xml sorted into the correct location. ShrinkWrap Descriptors could be put on top of that to also get descriptors sorted automatically at the correct location.

The current implementation knows some standard descriptor names. IMO that should probably expanded to also sort `jboss-ejb3.xml`, `jboss-web.xml`, `ibm-ejb-jar-bnd.xm[il]` etc.

Maybe I am too intrusive with this but I wanted at least to implement this thing as there was a lengthy constructive discussion around the original PR.
But maybe there is not really a need for a functionality like this, as developers should know where descriptors have to be placed, at latest when they are packaging their productive archives. (Personally I am only using CDI in tests, currently not possible in the productive software due to problems with AS7)