users@glassfish.java.net

Re: Deploy EAR through Maven 2?

From: <glassfish_at_javadesktop.org>
Date: Wed, 27 Jun 2007 08:25:53 PDT

If anyone is still interested...

My deployment problem was due to a dependency needed in deployment-time (when Glassfish reads the annotations to run wsgen, for example). The solution was quite easy: put all the jars in the /lib directory within the ear file. How?

In the pom.xml of the EAR project use <defaultLibBundleDir>lib</defaultLibBundleDir> like follows:

        <build>
                <finalName>VacationsAddRequestService-EAR</finalName>
                <plugins>
                        <plugin>
                                <artifactId>maven-ear-plugin</artifactId>
                                <configuration>
                                        <displayName>
                                                VacationsAddRequestService
                                        </displayName>
                                        <version>5</version>
                                        <defaultLibBundleDir>lib</defaultLibBundleDir>
                                        <modules>
                                                <ejbModule>
                                                        <groupId>
                                                                com.degesys.deas.vacations
                                                        </groupId>
                                                        <artifactId>
                                                                DEAS-VAC-VacationsAddRequestService_BIZ
                                                        </artifactId>
                                                </ejbModule>
                                                <jarModule>
                                                        <groupId>com.degesys.fwk</groupId>
                                                        <artifactId>FwkCore</artifactId>
                                                        <!-- includeInApplicationXml>true</includeInApplicationXml-->
                                                </jarModule>
                                        </modules>
                                </configuration>
                        </plugin>
                </plugins>

I could also use <buildDir> for each module instead, but this is easier... :-)

Regards,
JMB
[Message sent by forum member 'jm_beas' (jm_beas)]

http://forums.java.net/jive/thread.jspa?messageID=224245