Cómo agregar un archivo ear de compilación que contiene solo jars de dependencia en pom

I would like to create an ear containing only dependency jar files using maven.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <dependencies>
        <dependency>
            <groupId>groupId</groupId>
            <artifactId>artifactId</artifactId>
        </dependency>
        ......
        ......
        ......
    </dependencies>

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <configuration>
                <modules>
                    <jarModule>
                        <groupId>groupId</groupId>
                        <artifactId>artifcatId</artifactId>
                        <includeInApplicationXml>true</includeInApplicationXml>
                    </jarModule>
                </modules>
                ...............
                ...............
            </configuration>
        </plugin>
    </plugins>          
</project>

Maven created application.xml automatically which has entries for these jars but still, when deploying, I am getting message in console - "No modules found in ear."

Could you help me out what am I missing here.

preguntado el 03 de mayo de 12 a las 08:05

don't you know CTRL+SHIFT+F ? -

If i'm not wrong an EAR should contain an EJB module and/or and WAR module ? -

1 Respuestas

An EAR file should contain WARs, RARs, SARs, and EJB JARs. Anything else, including basic library JARs, are unimportant as far as the EAR is concerned and and EAR with just those kind of files is useless as far as a Java EE Application Server is concerned.

Respondido 29 Abr '13, 07:04

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.