Can someone provide me a working example of pom.xml which is used to build and deploy ear archive on jboss 5.1.0.
In my application I have two modules - web (.war archive) and java (.jar). I'm trying to accoplish the above task using the following pom.xml
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>tp</artifactId>
<groupId>com.domain.project</groupId>
<version>0.1</version>
</parent>
<groupId>com.domain.project</groupId>
<artifactId>build</artifactId>
<version>0.1</version>
<packaging>ear</packaging>
<name>project</name>
<repositories>
...
</repositories>
<build>
<finalName>project</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.4.1</version>
<configuration>
<jbossHome>/opt/jboss-5.1.0.GA</jbossHome>
<hostName>localhost</hostName>
<serverName>default</serverName>
<port>8080</port>
<fileNames>
<fileName>${basedir}/target/${build.finalName}.ear</fileName>
</fileNames>
</configuration>
</plugin>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<generateApplicationXml>true</generateApplicationXml>
<jboss>
<modules>
<webModule>web.war</webModule>
<ejbModule>core.jar</ejbModule>
</modules>
<version>5</version>
<loader-repository>com.domain.project:loader=project</loader-repository>
</jboss>
<modules>
<webModule>
<groupId>com.domain.project</groupId>
<artifactId>web</artifactId>
<bundleDir>/</bundleDir>
</webModule>
<javaModule>
<groupId>com.domain.project</groupId>
<artifactId>core</artifactId>
<bundleFileName>core.jar</bundleFileName>
</javaModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.domain.project</groupId>
<artifactId>core</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>com.domain.project</groupId>
<artifactId>web</artifactId>
<version>0.1</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
<version>1.0_02.CR4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<version>2.2.0.GA</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-jpdl</artifactId>
<version>3.2.2</version>
<type>jar</type>
</dependency>
</dependencies>
However I'm getting the following exception
org.jboss.deployers.spi.DeploymentException: Cannot process metadata
Seems that application.xml or jboss-app.xml aren't generated well... Any help will be appreciated.