views:

30

answers:

1

As I said in title when i build ear the artifacts (wars and ejbs) are copied inside ear but the APP-INF/lib is missing, and i don't know what could be the reason.

This is a part of pom.xml:

<plugin>
            <artifactId>maven-ear-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <earSourceDirectory>${basedir}/contentEar</earSourceDirectory>
                    <defaultLibBundleDir>APP-INF/lib</defaultLibBundleDir> 
                    <modules>
                        <webModule>
                            <groupId>my.webs</groupId>
                            <artifactId>web</artifactId>
                            <bundleFileName>web.war</bundleFileName>
                        </webModule>

                        <ejbModule>
                            <groupId>my.test.doc</groupId>
                            <artifactId>myEjb</artifactId>
                            <bundleFileName>myEjb.jar</bundleFileName>
                        </ejbModule>
                    </modules>
                </configuration>
                <executions>
                    <execution>
                        <id>build-ear</id>
                        <phase>package</phase>
                        <goals>
                            <goal>ear</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Also i should say that in /contentEar folder there are only application.xml and manifest files.

Please if you have an idea about this, help me...

+1  A: 

And what should Maven put in APP-INF/lib? What is the expected result? From the documentation:

Advanced Configuration

...

Please note that third party libraries (i.e. JarModule) are not included in the generated application.xml (only ejb-client should be included in a java entry). However, a jar dependency could be included in the generated application.xml by specifying the includeInApplicationXml flag.

It is also possible to specify a default bundle directory for all third party libraries by specifying the defaultLibBundleDir parameter.

But I don't see any jarModule in your configuration. Did you maybe declare some JAR libraries as dependencies? Please clarify.

The following post might also help:

Pascal Thivent
Thanks for posing i did not defined any jar modules, i expect that APP-INF/lib to be filled having something like transitive dependencys... i have as dependency defined only the war and ejb jar artifacts.