mardi 4 août 2015

Generate JEE deployment descriptors with Maven

I want to build an ear containing n ejbs that have same class code but different ejb names and different parameters in ejb-jar.xml

Can I generate these n entries in ejb-jar.xml with Maven?

Ideally it should build based on a properties file containing

EJBNames=EJB1, EJB2

EJB1=Param1

EJBn=Paramn

With ant that can be done with ant-contrib and foreach list

But with Maven?

The result should look like

<enterprise-beans>
        <session>
            <ejb-name>EJB1</ejb-name>
            <env-entry-value>PARAM1</env-entry-value>
        </session>
        <session>
            <ejb-name>EJB2</ejb-name>
            <env-entry-value>PARAM2</env-entry-value>
        </session>
</enterprise-beans>     

Aucun commentaire:

Enregistrer un commentaire