9 Replies Latest reply: Aug 4, 2013 4:39 PM by Guillaume Grossetie RSS

Generating application.xml for Enterprise Archive?

Michael Schuetz Novice

Hi to all,

 

typical EAR file build by ShrinkWrap looks like this:

 

{code}

@Deployment
    public static Archive<?> getTestArchive() {
        final WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war");
        final JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, "test.jar")
                .addClasses(MyService.class, MyServiceBean.class);
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class,
                "test.ear")
                .setApplicationXML("application.xml")
                .addModule(war)
                .addModule(ejb);

 

        return ear;
    }

{code}

 

AFAIK it is required to set application.xml explicitely.

 

For most usecases generating application.xml (like maven ear plugin does) would probably be sufficient.

So, if you don't set application.xml, would be nice that ShrinkWrap generates it (or a generateApplicationXML method if you don't like automagic).

 

What do you think?

 

 

Thanks and regards

Michael